diff options
Diffstat (limited to 'lib/common/Logging.cpp')
-rw-r--r-- | lib/common/Logging.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/common/Logging.cpp b/lib/common/Logging.cpp index 83efbc23..f7f72713 100644 --- a/lib/common/Logging.cpp +++ b/lib/common/Logging.cpp @@ -469,7 +469,8 @@ bool FileLogger::Log(Log::Level Level, const std::string& rFile, } /* avoid infinite loop if this throws an exception */ - Logging::Remove(this); + Log::Level oldLevel = GetLevel(); + Filter(Log::NOTHING); std::ostringstream buf; buf << FormatTime(GetCurrentBoxTime(), true, false); @@ -509,7 +510,8 @@ bool FileLogger::Log(Log::Level Level, const std::string& rFile, mLogFile.Write(output.c_str(), output.length()); - Logging::Add(this); + // no infinite loop, reset to saved logging level + Filter(oldLevel); return true; } |