Printing all status messages to std::cerr.

This commit is contained in:
Patrick Lühne 2016-11-24 23:37:15 +01:00
parent 30bd40ab45
commit 4bd95fe163
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

View File

@ -99,7 +99,7 @@ void Logger::log(Priority priority, const char *message)
if (priorityID < static_cast<int>(m_logPriority)) if (priorityID < static_cast<int>(m_logPriority))
return; return;
m_outputStream m_errorStream
<< priorityFormat(priority) << priorityName(priority) << ":" << priorityFormat(priority) << priorityName(priority) << ":"
<< ResetFormat() << " " << ResetFormat() << " "
<< MessageBodyFormat << message << MessageBodyFormat << message
@ -115,12 +115,7 @@ void Logger::log(Priority priority, const input::Location &location, const char
if (priorityID < static_cast<int>(m_logPriority)) if (priorityID < static_cast<int>(m_logPriority))
return; return;
auto &stream = m_errorStream
(priorityID > static_cast<int>(Priority::Warning))
? m_errorStream
: m_outputStream;
stream
<< LocationFormat << LocationFormat
<< location.sectionStart << ":" << location.rowStart << ":" << location.columnStart << ": " << location.sectionStart << ":" << location.rowStart << ":" << location.columnStart << ": "
<< priorityFormat(priority) << priorityName(priority) << ":" << priorityFormat(priority) << priorityName(priority) << ":"