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>
diff --git a/http/logging.hpp b/http/logging.hpp
index 2928f96..1d8e67f 100644
--- a/http/logging.hpp
+++ b/http/logging.hpp
@@ -183,7 +183,7 @@
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