summaryrefslogtreecommitdiff
path: root/http
diff options
context:
space:
mode:
authorJonathan Doman <jonathan.doman@intel.com>2023-08-19 02:11:25 +0300
committerJonathan Doman <jonathan.doman@intel.com>2023-08-19 02:20:06 +0300
commite334466e707876cdeedcda16e7072b2f4e978695 (patch)
tree4e050a1b6ea6e050d60eae25507794b8aa38229f /http
parent8549b951ff911b7a491f08d3e23c61ceeada6f8f (diff)
downloadbmcweb-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.hpp2
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