Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

Log Class Reference


Detailed Description

Log utils.

Definition at line 9 of file Log.h.

Static Public Member Functions

static void setLogLevel (int logLevel)
static int getLogLevel ()
static void log (int level, const char *file, int line, const ExInfo &info) throw ()
 Print log info.

Static Public Attributes

static const int LEVEL_DEBUG = 7
 Log priority, like syslog.
static const int LEVEL_INFO = 6
static const int LEVEL_WARNING = 4
static const int LEVEL_ERROR = 3


Member Function Documentation

static int Log::getLogLevel  )  [inline, static]
 

Definition at line 23 of file Log.h.

00023 { return ms_logLevel; }

void Log::log int  level,
const char *  file,
int  line,
const ExInfo info
throw () [static]
 

Print log info.

Parameters:
level priority level
file source file
line line number in source file
info detail info

Definition at line 27 of file Log.cpp.

00029 {
00030     if (level <= ms_logLevel) {
00031         const char *levelName;
00032         switch (level) {
00033             case LEVEL_DEBUG:
00034                 levelName = "DEBUG";
00035                 break;
00036             case LEVEL_INFO:
00037                 levelName = "INFO";
00038                 break;
00039             case LEVEL_WARNING:
00040                 levelName = "WARNING";
00041                 break;
00042             case LEVEL_ERROR:
00043                 levelName = "ERROR";
00044                 break;
00045             default:
00046                 levelName = "UNKNOWN";
00047                 break;
00048         }
00049 
00050         fprintf(stderr, "%s:%d: %s %s\n", file, line, levelName, info.what());
00051     }
00052 }

static void Log::setLogLevel int  logLevel  )  [inline, static]
 

Definition at line 22 of file Log.h.

00022 { ms_logLevel = logLevel; }


Field Documentation

const int Log::LEVEL_DEBUG = 7 [static]
 

Log priority, like syslog.

Definition at line 16 of file Log.h.

const int Log::LEVEL_ERROR = 3 [static]
 

Definition at line 19 of file Log.h.

const int Log::LEVEL_INFO = 6 [static]
 

Definition at line 17 of file Log.h.

const int Log::LEVEL_WARNING = 4 [static]
 

Definition at line 18 of file Log.h.


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:55:48 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2