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