Skip to content
Snippets Groups Projects
Commit 4b3d2f52 authored by Gerardo Tauriello's avatar Gerardo Tauriello
Browse files

Fixed weird log level behaviour in PopVerbosityLevel.

If nothing is specified, log level is 0.
Old: if last level was popped, level was set to 1.
New: level set to 0 in that case.
parent d2b73c71
Branches
Tags
No related merge requests found
......@@ -58,13 +58,13 @@ void Logger::PushVerbosityLevel(int l)
void Logger::PopVerbosityLevel()
{
if(!level_stack_.empty()) {
if (!level_stack_.empty()) {
level_stack_.pop();
}
if(level_stack_.empty()) {
level_=1;
if (level_stack_.empty()) {
level_ = 0;
} else {
level_=level_stack_.top();
level_ = level_stack_.top();
}
}
......@@ -86,7 +86,7 @@ void Logger::PushSink(LogSinkPtr& sink)
void Logger::PopSink()
{
if(sink_stack_.size()>1) {
if (sink_stack_.size() > 1) {
sink_stack_.pop();
} else {
LOG_ERROR("Can't pop sink. There is only one sink left on the stack");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment