Darwin  1.10(beta)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Static Public Member Functions | Static Public Attributes | List of all members
drwnLogger Class Reference

Message and error logging. This class is not thread-safe in the interest of not having to flush the log on every message. More...

Static Public Member Functions

static void initialize (const char *filename, bool bOverwrite=false)
 open a log file
 
static void initialize (const char *filename, bool bOverwrite, drwnLogLevel level)
 open a log file with particular logging level
 
static void setLogLevel (drwnLogLevel level)
 set the current verbosity level
 
static drwnLogLevel setAtLeastLogLevel (drwnLogLevel level)
 set the current verbosity level unless already at a lower level and return previous log level
 
static drwnLogLevel getLogLevel ()
 get the current verbosity level
 
static bool checkLogLevel (drwnLogLevel level)
 check whether current verbosity level is above given level
 
static void cacheCommandLine (int argc, char **argv)
 save the command line string (will be logged when the log file is opened)
 
static void logMessage (drwnLogLevel level, const string &msg)
 log a message (see also DRWN_LOG_* macros)
 
static void setRunning (bool bRunning)
 
static bool isRunning ()
 
static void initProgress (const char *status=NULL, int maxProgress=100)
 
static void setProgressStatus (const char *status)
 
static bool incrementProgress ()
 
static bool updateProgress (double p)
 

Static Public Attributes

static void(* showFatalCallback )(const char *message) = NULL
 callback for fatal errors
 
static void(* showErrorCallback )(const char *message) = NULL
 callback for non-fatal errors
 
static void(* showWarningCallback )(const char *message) = NULL
 callback for warnings
 
static void(* showStatusCallback )(const char *message) = NULL
 callback for status updates
 
static void(* showMessageCallback )(const char *message) = NULL
 callback for messages (standard, verbose and debug)
 
static void(* showProgressCallback )(const char *status, double p) = NULL
 callback for displaying progress
 

Detailed Description

Message and error logging. This class is not thread-safe in the interest of not having to flush the log on every message.

See Also
Messages, Warnings and Errors

The documentation for this class was generated from the following files: