libsdr  0.1.0
A simple SDR library
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
sdr::Logger Class Reference

The logger class (singleton). More...

#include <logger.hh>

Public Member Functions

virtual ~Logger ()
 Destructor. More...
 
void log (const LogMessage &message)
 Logs a message. More...
 
void addHandler (LogHandler *handler)
 Adds a message handler. More...
 

Static Public Member Functions

static Loggerget ()
 Returns the singleton instance of the logger. More...
 

Protected Member Functions

 Logger ()
 Hidden constructor. More...
 

Protected Attributes

std::list< LogHandler * > _handler
 All registered handlers. More...
 

Static Protected Attributes

static Logger_instance = 0
 The singleton instance. More...
 

Detailed Description

The logger class (singleton).

Constructor & Destructor Documentation

Logger::Logger ( )
protected

Hidden constructor.

Use get to obtain an instance.

Logger::~Logger ( )
virtual

Destructor.

Member Function Documentation

void Logger::addHandler ( LogHandler handler)

Adds a message handler.

The ownership of the hander is transferred to the logger instance.

Logger & Logger::get ( )
static

Returns the singleton instance of the logger.

void Logger::log ( const LogMessage message)

Logs a message.

Member Data Documentation

std::list<LogHandler *> sdr::Logger::_handler
protected

All registered handlers.

Logger * Logger::_instance = 0
staticprotected

The singleton instance.


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