BLT/src/blt/logging/logging.cpp

46 lines
1.3 KiB
C++
Raw Normal View History

2025-03-01 20:44:25 -05:00
/*
* <Short Description>
* Copyright (C) 2025 Brett Terpstra
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <blt/logging/logging.h>
2025-03-01 21:56:57 -05:00
#include <blt/std/types.h>
2025-03-01 20:44:25 -05:00
2025-03-01 21:56:57 -05:00
namespace blt::logging
2025-03-01 20:44:25 -05:00
{
2025-03-01 21:56:57 -05:00
void logger_t::compile()
{
2025-03-01 20:44:25 -05:00
2025-03-01 21:56:57 -05:00
}
void logger_t::insert_next_value(const std::string& arg)
{
const auto begin = fmt.find('{');
const auto end = fmt.find('}', begin);
fmt.erase(fmt.begin() + static_cast<i64>(begin), fmt.begin() + static_cast<i64>(end) + 1);
fmt.insert(begin, arg);
}
void print(const std::string& fmt)
{
std::cout << fmt;
}
void newline()
{
std::cout << std::endl;
}
2025-03-01 20:44:25 -05:00
}