libdrmconf  0.10.4
A library to program DMR radios.
Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members

Singleton class to process log messages. More...

#include <logger.hh>

Inheritance diagram for Logger:
Inheritance graph
[legend]
Collaboration diagram for Logger:
Collaboration graph
[legend]

Public Member Functions

virtual ~Logger ()
 Destructor.
 
void log (const LogMessage &msg)
 Logs a message.
 
void addHandler (LogHandler *handler)
 Adds a log-handler to the logger. More...
 
void remHandler (LogHandler *handler)
 Removes a log-handler from the logger. More...
 

Static Public Member Functions

static Loggerget ()
 Factory method to get the singleton instance.
 

Protected Slots

void onHandlerDeleted (QObject *obj)
 Internal callback to handle deleted handler objects.
 

Protected Member Functions

 Logger ()
 Hidden constructor. More...
 

Protected Attributes

QList< LogHandler * > _handler
 The list of registered log-handler.
 

Static Protected Attributes

static Logger_instance = nullptr
 The singleton instance.
 

Detailed Description

Singleton class to process log messages.

Constructor & Destructor Documentation

◆ Logger()

Logger::Logger ( )
protected

Hidden constructor.

Use get method to obtain an instance.

Member Function Documentation

◆ addHandler()

void Logger::addHandler ( LogHandler handler)

Adds a log-handler to the logger.

The ownership is transferred to the logger.

◆ remHandler()

void Logger::remHandler ( LogHandler handler)

Removes a log-handler from the logger.

The ownership is transferred back to the caller.


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