From 41bf0240b425741850acdbce70181d3ee2d7c184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A3=CF=84=CE=AD=CF=86=CE=B1=CE=BD=CE=BF=CF=82=20=22Coor?= =?UTF-8?q?nio/8924th=22=20=CE=92=CE=BB=CE=B1=CF=83=CF=84=CF=8C=CF=82?= <8924th@gmail.com> Date: Sat, 24 Aug 2024 20:44:55 +0300 Subject: [PATCH] always endl log messages --- src/Assistants/BasicLogger.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Assistants/BasicLogger.cpp b/src/Assistants/BasicLogger.cpp index f99e22c..27ae66b 100644 --- a/src/Assistants/BasicLogger.cpp +++ b/src/Assistants/BasicLogger.cpp @@ -61,10 +61,10 @@ void BasicLogger::newEntry(const BLOG type, const std::string& message) noexcept static std::size_t lineCount; std::ostringstream output; - output << ++lineCount << " :: " << getSeverity(type) << " :: " << message << std::endl; + output << ++lineCount << " :: " << getSeverity(type) << " :: " << message; - std::cout << output.str(); - if (lineCount % 10 == 0) { std::cout.flush(); } + std::cout << output.str() << std::endl; + if (lineCount % 10 == 0) [[unlikely]] { std::cout.flush(); } std::ofstream logFile(mLogPath, std::ios::app); if (!logFile) {