Logger class. More...
#include <log.h>

Public Member Functions | |
| log (std::ostream &out=std::clog, int verbose=0) | |
| Constructor. | |
| virtual | ~log () |
| Destructor. | |
| void | operator() (int level, const std::string &message) |
| Write to log. | |
Logger class.
The class provides the application events logger features. It has thread-safe, asynchronous architecture (producer-consumer).
| dbp::log::log | ( | std::ostream & | out = std::clog, |
|
| int | verbose = 0 | |||
| ) |
Constructor.
Initializes the logging with provided verbosity level.
| out | the output stream where log whould be written to. | |
| verbose | the verbosity level. |
| virtual dbp::log::~log | ( | ) | [virtual] |
Destructor.
Flushes the log queue.
| void dbp::log::operator() | ( | int | level, | |
| const std::string & | message | |||
| ) |
Write to log.
Adds the specified string into a logging queue and wakes up the logging thread.
| level | the verbosity level | |
| message | the logging message |