fix: logger not flushing after every line
This commit is contained in:
@@ -51,6 +51,7 @@ void Logger::log(LogLevel level, const std::string& name, std::string message) {
|
|||||||
auto string = ss.str();
|
auto string = ss.str();
|
||||||
if (file.good()) {
|
if (file.good()) {
|
||||||
file << string << '\n';
|
file << string << '\n';
|
||||||
|
file.flush();
|
||||||
}
|
}
|
||||||
std::cout << string << std::endl;
|
std::cout << string << std::endl;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user