add logger.print

This commit is contained in:
MihailRis
2024-12-19 22:57:51 +03:00
parent 3d7a9fd225
commit 3d6c1183c4
2 changed files with 12 additions and 1 deletions
+6
View File
@@ -23,10 +23,16 @@ Logger::Logger(std::string name) : name(std::move(name)) {
void Logger::log(
LogLevel level, const std::string& name, const std::string& message
) {
if (level == LogLevel::print) {
std::cout << "[" << name << "] " << message << std::endl;
return;
}
using namespace std::chrono;
std::stringstream ss;
switch (level) {
case LogLevel::print:
case LogLevel::debug:
#ifdef NDEBUG
return;