Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | Related Pages

streamlog Namespace Reference

A general logging library that is used in Marlin. More...


Classes

class  logbuffer
 Helper class that adds a prefix to every new line that is written to its std::ostream. More...

class  logscope
 Helper class to change the current scope name and log level - if the object goes out of scope, e.g. More...

class  logstream
 Class defining a log stream that is used to print log messages depending on current log level. More...

class  logstream::nullstream
 Private helper class returned if message log level not reached.

class  prefix
 Default log message prefix: [ LevelName "ScopeName"]. More...

class  prefix_base
 Base class for log message prefix formating. More...

struct  Verbosity

Enumerations

enum  log_level_enum { debug_base_level = 0, message_base_level = 100, warning_base_level = 200, error_base_level = 300 }

Variables

logstream out
 global instance of logstream


Detailed Description

A general logging library that is used in Marlin.

Default log levels for streamlog::logstream:

By default all groups are active, except DEBUG when compiled with -DNDEBUG, i.e. in release mode. Through -DSTREAMLOG_LEVEL=N, where N=0,1,2,3,4 this behaviour can be changed, e.g. if -DSTREAMLOG_LEVEL=2 is specified all compile time all messages of the groups DEBUG and MESSAGE are suppressed (no overhead in space or time) and only WARNING and ERROR messages will be visible if the current log level is reached.

Users can define their own log levels or additional loglevels with the macro:

DEFINE_STREAMLOG_LEVEL( classname, "LogString", loglevel , active_flag )
if active flag is false corresponding code will have no effect.

Author:
F. Gaede, DESY
Version:
Id
loglevels.h,v 1.3 2007/08/08 13:58:33 gaede Exp


Generated on Mon Jan 12 09:48:59 2009 for Marlin by doxygen 1.3.5