errors are now logged to console instead of log file

This commit is contained in:
mazzol_a
2025-05-15 09:01:53 +02:00
parent 015b4add65
commit 4174ccba5f
3 changed files with 28 additions and 18 deletions
+6 -2
View File
@@ -47,11 +47,15 @@ class Logger {
public:
Logger() = default;
explicit Logger(TLogLevel level) : level(level){};
explicit Logger(TLogLevel level) : level(level) {};
~Logger() {
// output in the destructor to allow for << syntax
os << RESET << '\n';
std::clog << os.str() << std::flush; // Single write
if (level == TLogLevel::logERROR)
std::clog << os.str() << std::flush; // Single write
else {
std::cout << os.str() << std::flush;
}
}
static TLogLevel &ReportingLevel() { // singelton eeh