diff options
author | Jonathan Doman <jonathan.doman@intel.com> | 2023-08-19 02:11:25 +0300 |
---|---|---|
committer | Jonathan Doman <jonathan.doman@intel.com> | 2023-08-19 02:20:06 +0300 |
commit | e334466e707876cdeedcda16e7072b2f4e978695 (patch) | |
tree | 4e050a1b6ea6e050d60eae25507794b8aa38229f /http | |
parent | 8549b951ff911b7a491f08d3e23c61ceeada6f8f (diff) | |
download | bmcweb-e334466e707876cdeedcda16e7072b2f4e978695.tar.xz |
Flush each log message
cout is usually buffered, so make sure that every log message gets
individually flushed. This is especially important when relying on the
systemd journal for timestamping of messages.
Change-Id: I28f6f46978c2fad7855f819b04df964ab3c51351
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
Diffstat (limited to 'http')
-rw-r--r-- | http/logging.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/http/logging.hpp b/http/logging.hpp index 2928f968e0..1d8e67ffb6 100644 --- a/http/logging.hpp +++ b/http/logging.hpp @@ -183,7 +183,7 @@ inline void vlog(const FormatString& format, std::format_args&& args) filename = filename.substr(filename.rfind('/') + 1); std::cout << std::format("[{} {}:{}] ", levelString, filename, format.loc.line()) - << std::vformat(format.str, args) << '\n'; + << std::vformat(format.str, args) << std::endl; } } // namespace crow |