#include <logsink.h>
Public Member Functions | |
LogSink () | |
virtual | ~LogSink () |
void | log (LogLevel level, LogArea area, const std::string &message) const |
void | registerLogHandler (LogLevel level, int areas, LogHandler *lh) |
void | removeLogHandler (LogHandler *lh) |
Definition at line 32 of file logsink.h.
LogSink | ( | ) |
Constructor.
Definition at line 20 of file logsink.cpp.
~LogSink | ( | ) | [virtual] |
Virtual destructor.
Definition at line 25 of file logsink.cpp.
Use this function to log a message with given LogLevel and LogIdentifier.
level | The severity of the logged event. | |
area | The part of the program/library the message comes from. | |
message | The actual log message. |
Definition at line 29 of file logsink.cpp.
Referenced by DNS::connect(), Connection::connect(), and Connection::recv().
void registerLogHandler | ( | LogLevel | level, | |
int | areas, | |||
LogHandler * | lh | |||
) |
Registers lh
as object that receives all debug messages of the specified type. Suitable for logging to a file, etc.
level | The LogLevel for this handler. | |
areas | Bit-wise ORed LogAreas the LogHandler wants to be informed about. | |
lh | The object to receive exchanged data. |
Definition at line 39 of file logsink.cpp.
void removeLogHandler | ( | LogHandler * | lh | ) |
Removes the given object from the list of log handlers.
lh | The object to remove from the list. |
Definition at line 45 of file logsink.cpp.