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 Logger & | get ()
| 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:

- /Users/hannes/Uni/Elektronik/sdr/libsdr/src/logger.hh
- /Users/hannes/Uni/Elektronik/sdr/libsdr/src/logger.cc