Skip to content

Commit

Permalink
Flush log buffer upon completed message
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan-Tan committed Aug 27, 2023
1 parent 0b201c5 commit 03a155c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/riot-cpp/logging/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ namespace logging {

Logger& Logger::operator<<(const int err_code) {
if (this->_incoming && !err_code) {
this->_log_file << '\n';
this->_log_file << std::endl; // use std::endl as we want to flush the buffer on every log message
this->_incoming = false;
return *this;
}
Expand Down

0 comments on commit 03a155c

Please sign in to comment.