diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-04-09 22:15:25 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-04-09 22:15:25 +0000 |
commit | e0d11ae476981fd56229b4ccffdd30166361548b (patch) | |
tree | 1454c0ef13ea79acc495f10ca79de31ee613e9ab /lib/common/Logging.cpp | |
parent | cd45df502bf91e550692d9930c6aaffc137eaadf (diff) |
Remove the global logging level.
It's incompatible with having a logger that logs everything, regardless of
the global log level.
Diffstat (limited to 'lib/common/Logging.cpp')
-rw-r--r-- | lib/common/Logging.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/common/Logging.cpp b/lib/common/Logging.cpp index 0a52fa5b..af132fa3 100644 --- a/lib/common/Logging.cpp +++ b/lib/common/Logging.cpp @@ -42,16 +42,12 @@ std::vector<Logger*> Logging::sLoggers; std::string Logging::sContext; Console* Logging::spConsole = NULL; Syslog* Logging::spSyslog = NULL; -Log::Level Logging::sGlobalLevel = Log::EVERYTHING; Logging Logging::sGlobalLogging; //automatic initialisation std::string Logging::sProgramName; HideSpecificExceptionGuard::SuppressedExceptions_t HideSpecificExceptionGuard::sSuppressedExceptions; -int Logging::Guard::sGuardCount = 0; -Log::Level Logging::Guard::sOriginalLevel = Log::INVALID; - Logging::Logging() { ASSERT(!spConsole); @@ -142,11 +138,6 @@ void Logging::Remove(Logger* pOldLogger) void Logging::Log(Log::Level level, const std::string& rFile, int line, const std::string& rMessage) { - if (level > sGlobalLevel) - { - return; - } - std::string newMessage; if (sContextSet) @@ -175,11 +166,6 @@ void Logging::LogToSyslog(Log::Level level, const std::string& rFile, return; } - if (level > sGlobalLevel) - { - return; - } - std::string newMessage; if (sContextSet) @@ -255,8 +241,7 @@ Logger::~Logger() bool Logger::IsEnabled(Log::Level level) { - return Logging::IsEnabled(level) && - (int)mCurrentLevel >= (int)level; + return (int)mCurrentLevel >= (int)level; } bool Console::sShowTime = false; |