Printing messages only if message has at least a specified priority.
This commit is contained in:
parent
93597f16a0
commit
1103f5cbf1
@ -101,6 +101,9 @@ void Logger::log(Priority priority, const char *message)
|
||||
{
|
||||
const auto priorityID = static_cast<int>(priority);
|
||||
|
||||
if (priorityID < static_cast<int>(m_outputPriority))
|
||||
return;
|
||||
|
||||
auto &stream =
|
||||
(priorityID > static_cast<int>(Priority::Warning))
|
||||
? m_errorStream
|
||||
@ -119,6 +122,9 @@ void Logger::log(Priority priority, const input::Location &location, const char
|
||||
{
|
||||
const auto priorityID = static_cast<int>(priority);
|
||||
|
||||
if (priorityID < static_cast<int>(m_outputPriority))
|
||||
return;
|
||||
|
||||
auto &stream =
|
||||
(priorityID > static_cast<int>(Priority::Warning))
|
||||
? m_errorStream
|
||||
|
Loading…
Reference in New Issue
Block a user