mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-12 17:57:38 +00:00
Fix log color, otherwise, the immediate line followed by the colored log will be tainted (#17329)
This commit is contained in:
parent
c438360c1e
commit
f3682eee3b
1 changed files with 4 additions and 2 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue