mirror of https://github.com/Icinga/icinga2.git
parent
2fb0c3d335
commit
9b7702195a
|
@ -90,6 +90,8 @@ void StreamLogger::ProcessLogEntry(std::ostream& stream, bool tty, const LogEntr
|
||||||
|
|
||||||
boost::mutex::scoped_lock lock(m_Mutex);
|
boost::mutex::scoped_lock lock(m_Mutex);
|
||||||
|
|
||||||
|
stream << "[" << timestamp << "] <" << Utility::GetThreadName() << "> ";
|
||||||
|
|
||||||
if (tty) {
|
if (tty) {
|
||||||
switch (entry.Severity) {
|
switch (entry.Severity) {
|
||||||
case LogWarning:
|
case LogWarning:
|
||||||
|
@ -103,14 +105,12 @@ void StreamLogger::ProcessLogEntry(std::ostream& stream, bool tty, const LogEntr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stream << "[" << timestamp << "] <" << Utility::GetThreadName() << "> "
|
stream << Logger::SeverityToString(entry.Severity);
|
||||||
<< Logger::SeverityToString(entry.Severity) << "/" << entry.Facility << ": "
|
|
||||||
<< entry.Message;
|
|
||||||
|
|
||||||
if (tty)
|
if (tty)
|
||||||
stream << "\x1b[0m"; // clear colors
|
stream << "\x1b[0m"; // clear colors
|
||||||
|
|
||||||
stream << "\n";
|
stream << "/" << entry.Facility << ": " << entry.Message << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue