Public Member Functions | List of all members
LogSink Class Reference

#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)

Detailed Description

An implementation of log sink and source.

To log the output of your Client or Component, use ClientBase's logInstance() to get hold of the LogSink object for that ClientBase. Register your LogHandler with that instance.

You should not need to use this class directly.

Jakob Schroeter

Definition at line 38 of file logsink.h.

Constructor & Destructor Documentation

LogSink ( )


Definition at line 20 of file logsink.cpp.

~LogSink ( )

Virtual destructor.

Definition at line 25 of file logsink.cpp.

Member Function Documentation

void log ( LogLevel  level,
LogArea  area,
const std::string &  message 
) const

Use this function to log a message with given LogLevel and LogIdentifier.

levelThe severity of the logged event.
areaThe part of the program/library the message comes from.
messageThe actual log message.

Definition at line 29 of file logsink.cpp.

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.

levelThe LogLevel for this handler.
areasBit-wise ORed LogAreas the LogHandler wants to be informed about.
lhThe 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.

lhThe object to remove from the list.

Definition at line 45 of file logsink.cpp.

The documentation for this class was generated from the following files: