00001 /****************************************************************************** 00002 * swlog.h - definition of class SWLog used for logging messages 00003 * 00004 * $Id: swlog_8h-source.html,v 1.1 2003/02/28 21:22:02 mgruner Exp $ 00005 * 00006 * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) 00007 * CrossWire Bible Society 00008 * P. O. Box 2528 00009 * Tempe, AZ 85280-2528 00010 * 00011 * This program is free software; you can redistribute it and/or modify it 00012 * under the terms of the GNU General Public License as published by the 00013 * Free Software Foundation version 2. 00014 * 00015 * This program is distributed in the hope that it will be useful, but 00016 * WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * General Public License for more details. 00019 * 00020 */ 00021 00022 //--------------------------------------------------------------------------- 00023 #ifndef swlogH 00024 #define swlogH 00025 //--------------------------------------------------------------------------- 00026 00027 #include <defs.h> 00028 00029 SWORD_NAMESPACE_START 00030 00031 class SWDLLEXPORT SWLog { 00032 protected: 00033 char logLevel; 00034 00035 public: 00036 static SWLog *systemlog; 00037 00038 SWLog () { logLevel = 1; /*default to show only errors*/} 00039 virtual void setLogLevel(char level) { logLevel = level; } 00040 virtual char getLogLevel() { return logLevel; } 00041 virtual void LogWarning (char *fmt, ...); 00042 virtual void LogError (char *fmt, ...); 00043 virtual void LogTimedInformation (char *fmt, ...); 00044 virtual void LogInformation (char *fmt, ...); 00045 }; 00046 00047 SWORD_NAMESPACE_END 00048 #endif