#include <logger.h>
Public Types | |
typedef std::list< Log * > | container_type |
The container type. | |
Public Member Functions | |
Logger (modules::Core &core, LogRules const &rules) | |
Constructor. | |
Logger (Logger const &l) | |
Copy constructor. | |
Logger & | operator= (Logger const &right) |
Assignment operator. | |
void | log (LogLevel const &level, char const *format,...) FORMAT(printf |
Logs a message. | |
void void | register_interface (Log &interface) |
Registers a log interface. | |
void | unregister_interface (Log &interface) |
Unregisters a log interface. | |
void | vlog (LogLevel const &level, char const *format, va_list args) |
Same as log(), but using variable argument lists. | |
Static Public Attributes | |
static int const | msg_length = 2048 |
Maximum length for log messages. |
|
Constructor.
|
|
Logs a message. The message will be forwarded to all log interfaces and, if the program doesn't run in background, printed to either stdout or stderr.
|
|
Registers a log interface. The interface must remain valid until it is registered (it is NOT copied). Don't forget to unregister the interface before it is destructed, or there'll be troubles.
|
|
Unregisters a previously registered log interface.
|