class ConfigureLOGstream Configure and write to a log stream; type-safe, thread-safe and very portable. Inspired by Petru Marginean, "Logging in C++," Dr.Dobbs, October 2007.
How to use: 1. include logstream.hpp in all modules that will write to the log, and (optional) define the stream. If stream is not defined, std::cout is used.
How to use: 2. set switches to output time tags and level (default = false)
How to use: 3. set the maximum level to output. Choices (in enum LogLevel) are: ERROR,WARNING,INFO,VERBOSE,DEBUG,DEBUG1,DEBUG2,DEBUG3,DEBUG4,DEBUG5,DEBUG6,DEBUG7
NB. All the ConfigureLOG:: settings are defined in ALL linked modules that includes logstream.hpp, whenever they are set in ANY such module.
How to use: 4. write to LOG(level) where level is one of the LogLevel choices. Only output at or below the ReportingLevel() will appear in log.
How to use: 5. Change ReportingLevel() or the output Stream() at any time.
Definition at line 274 of file logstream.hpp.
#include <logstream.hpp>
Static Public Member Functions | |
static void | Output (const std::string &msg) |
used internally More... | |
static std::ostream *& | Stream () |
|
inlinestatic |
used internally
Definition at line 294 of file logstream.hpp.
|
inlinestatic |
direct log stream output to an already opened stream, for example:
Definition at line 288 of file logstream.hpp.