summaryrefslogtreecommitdiff
path: root/lib/common/Logging.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-01-15 23:48:12 +0000
committerChris Wilson <chris+github@qwirx.com>2007-01-15 23:48:12 +0000
commit60e8f1ea15e69b987ec916fd006174b345444644 (patch)
treef8c331ccf5bc4c41ffe4031509a7f154b3003845 /lib/common/Logging.h
parente04804ca2f08402ac6b8fa7d043767eb42738de7 (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.h')
-rw-r--r--lib/common/Logging.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/common/Logging.h b/lib/common/Logging.h
index e7a11d36..c85b4586 100644
--- a/lib/common/Logging.h
+++ b/lib/common/Logging.h
@@ -34,6 +34,7 @@
#define BOX_FATAL(stuff) BOX_LOG(Log::FATAL, stuff)
#define BOX_ERROR(stuff) BOX_LOG(Log::ERROR, stuff)
#define BOX_WARNING(stuff) BOX_LOG(Log::WARNING, stuff)
+#define BOX_NOTICE(stuff) BOX_LOG(Log::NOTICE, stuff)
#define BOX_INFO(stuff) BOX_LOG(Log::INFO, stuff)
#if defined NDEBUG && ! defined COMPILE_IN_TRACES
#define BOX_TRACE(stuff)
@@ -43,7 +44,8 @@
namespace Log
{
- enum Level { NOTHING = 1, FATAL, ERROR, WARNING, INFO, TRACE, EVERYTHING };
+ enum Level { NOTHING = 1, FATAL, ERROR, WARNING, NOTICE, INFO, TRACE,
+ EVERYTHING };
}
// --------------------------------------------------------------------------
@@ -61,7 +63,7 @@ class Logger
Log::Level mCurrentLevel;
public:
- Logger() : mCurrentLevel(Log::WARNING) { }
+ Logger() : mCurrentLevel(Log::EVERYTHING) { }
virtual ~Logger() { }
virtual bool Log(Log::Level level, const std::string& rFile,