From 0e171f291d29e87cb0fb1781946949332b8a2554 Mon Sep 17 00:00:00 2001 From: Erik Frojdh Date: Mon, 9 Mar 2020 13:57:50 +0100 Subject: [PATCH] added std::flush --- sample/using_logger.cpp | 1 + slsSupportLib/include/logger2.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sample/using_logger.cpp b/sample/using_logger.cpp index 658f93910..97574a642 100644 --- a/sample/using_logger.cpp +++ b/sample/using_logger.cpp @@ -43,4 +43,5 @@ int main() { LOG(logINFOBLUE) << "some infoBLUE text"; LOG(logINFOGREEN) << "some infoGREEN text"; LOG(logINFORED) << "some infoRED text"; + } \ No newline at end of file diff --git a/slsSupportLib/include/logger2.h b/slsSupportLib/include/logger2.h index adc3ebb28..cbd0d31a3 100644 --- a/slsSupportLib/include/logger2.h +++ b/slsSupportLib/include/logger2.h @@ -22,7 +22,7 @@ class Logger { ~Logger() { // output in the destructor to allow for << syntax os << RESET << '\n'; - std::clog << os.str(); // Single write + std::clog << os.str() << std::flush; // Single write } static TLogLevel &ReportingLevel() { // singelton eeh