Skip to content

Commit

Permalink
always endl log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
coornio committed Aug 24, 2024
1 parent 1e15a93 commit 41bf024
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Assistants/BasicLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 41bf024

Please sign in to comment.