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 |
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.