diff options
Diffstat (limited to 'include/swlog.h')
-rw-r--r-- | include/swlog.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/include/swlog.h b/include/swlog.h index 9925a83..a836c8f 100644 --- a/include/swlog.h +++ b/include/swlog.h @@ -1,7 +1,7 @@ /****************************************************************************** * swlog.h - definition of class SWLog used for logging messages * - * $Id: swlog.h,v 1.3 2001/02/09 15:38:51 jansorg Exp $ + * $Id: swlog.h,v 1.5 2002/10/01 19:52:40 dglassey Exp $ * * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society @@ -26,21 +26,23 @@ #include <defs.h> -class SWDLLEXPORT SWLog -{ +SWORD_NAMESPACE_START + +class SWDLLEXPORT SWLog { +protected: + char logLevel; + public: - static SWLog *systemlog; + static SWLog *systemlog; - bool log; - SWLog () - { - log = true; - } - virtual void LogWarning (char *fmt, ...); - virtual void LogError (char *fmt, ...); - virtual void LogTimedInformation (char *fmt, ...); - virtual void LogInformation (char *fmt, ...); + SWLog () { logLevel = 1; /*default to show only errors*/} + virtual void setLogLevel(char level) { logLevel = level; } + virtual char getLogLevel() { return logLevel; } + virtual void LogWarning (char *fmt, ...); + virtual void LogError (char *fmt, ...); + virtual void LogTimedInformation (char *fmt, ...); + virtual void LogInformation (char *fmt, ...); }; - +SWORD_NAMESPACE_END #endif |