This commit is contained in:
2023-06-02 12:51:08 +02:00
commit 0e355fbe42
142 changed files with 10281 additions and 0 deletions

19
src/Logger.cpp Normal file
View File

@@ -0,0 +1,19 @@
//
// Created by Stepan Usatiuk on 23.05.2023.
//
#include "Logger.h"
Logger::Logger(int level, std::ostream &out) : loglevel(level), out(out) {
}
void Logger::write(const std::string &what, int whatlevel) {
if (whatlevel <= loglevel) {
std::lock_guard outLock(outM);
out.get() << what << std::flush;
}
}
void Logger::setLevel(int level) {
loglevel = level;
}