Don't use colors for the whole log message.

Refs #6070
This commit is contained in:
Gunnar Beutner 2014-05-12 10:27:01 +02:00
parent 2fb0c3d335
commit 9b7702195a
1 changed files with 4 additions and 4 deletions

View File

@ -90,6 +90,8 @@ void StreamLogger::ProcessLogEntry(std::ostream& stream, bool tty, const LogEntr
boost::mutex::scoped_lock lock(m_Mutex);
stream << "[" << timestamp << "] <" << Utility::GetThreadName() << "> ";
if (tty) {
switch (entry.Severity) {
case LogWarning:
@ -103,14 +105,12 @@ void StreamLogger::ProcessLogEntry(std::ostream& stream, bool tty, const LogEntr
}
}
stream << "[" << timestamp << "] <" << Utility::GetThreadName() << "> "
<< Logger::SeverityToString(entry.Severity) << "/" << entry.Facility << ": "
<< entry.Message;
stream << Logger::SeverityToString(entry.Severity);
if (tty)
stream << "\x1b[0m"; // clear colors
stream << "\n";
stream << "/" << entry.Facility << ": " << entry.Message << "\n";
}
/**