diff --git a/onnxruntime/core/common/logging/sinks/ostream_sink.cc b/onnxruntime/core/common/logging/sinks/ostream_sink.cc index 3b832c9d63..0db3d8709d 100644 --- a/onnxruntime/core/common/logging/sinks/ostream_sink.cc +++ b/onnxruntime/core/common/logging/sinks/ostream_sink.cc @@ -46,7 +46,7 @@ void OStreamSink::SendImpl(const Timestamp& timestamp, const std::string& logger #endif msg << timestamp << " [" << message.SeverityPrefix() << ":" << message.Category() << ":" << logger_id << ", " - << message.Location().ToString() << "] " << message.Message() << "\n"; + << message.Location().ToString() << "] " << message.Message(); #ifndef ORT_MINIMAL_BUILD if (message.Severity() == Severity::kWARNING || @@ -55,6 +55,7 @@ void OStreamSink::SendImpl(const Timestamp& timestamp, const std::string& logger msg << Color::kEnd; } #endif + msg << "\n"; (*stream_) << msg.str(); @@ -87,7 +88,7 @@ void WOStreamSink::SendImpl(const Timestamp& timestamp, const std::string& logge #endif msg << timestamp << L" [" << message.SeverityPrefix() << L":" << message.Category() << L":" << ToWideString(logger_id) << L", " - << ToWideString(message.Location().ToString()) << L"] " << ToWideString(message.Message()) << L"\n"; + << ToWideString(message.Location().ToString()) << L"] " << ToWideString(message.Message()); #ifndef ORT_MINIMAL_BUILD if (message.Severity() == Severity::kWARNING || @@ -96,6 +97,7 @@ void WOStreamSink::SendImpl(const Timestamp& timestamp, const std::string& logge msg << Color::kLEnd; } #endif + msg << L"\n"; (*stream_) << msg.str();