diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-01-15 23:48:12 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-01-15 23:48:12 +0000 |
commit | 60e8f1ea15e69b987ec916fd006174b345444644 (patch) | |
tree | f8c331ccf5bc4c41ffe4031509a7f154b3003845 /lib/common/Logging.cpp | |
parent | e04804ca2f08402ac6b8fa7d043767eb42738de7 (diff) |
Add a new logging level, NOTICE, between INFO and WARNING (justification:
we need two levels of output for LogAllFileAccess, neither of which are
warnings, one is very verbose, but must not be compiled out like TRACE).
Make Loggers default to logging everything.
Make the global log level filter work. (refs #3)
Diffstat (limited to 'lib/common/Logging.cpp')
-rw-r--r-- | lib/common/Logging.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/common/Logging.cpp b/lib/common/Logging.cpp index dad96126..3e2062da 100644 --- a/lib/common/Logging.cpp +++ b/lib/common/Logging.cpp @@ -23,7 +23,7 @@ std::vector<Logger*> Logging::sLoggers; std::string Logging::sContext; Console Logging::sConsole; Syslog Logging::sSyslog; -Log::Level Logging::sGlobalLevel; +Log::Level Logging::sGlobalLevel = Log::EVERYTHING; void Logging::ToSyslog(bool enabled) { @@ -95,6 +95,11 @@ 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) |