|
libdrmconf
0.10.4
A library to program DMR radios.
|
Singleton class to process log messages. More...
#include <logger.hh>


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 Logger & | get () |
| 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. | |
Singleton class to process log messages.
|
protected |
Hidden constructor.
Use get method to obtain an instance.
| void Logger::addHandler | ( | LogHandler * | handler | ) |
Adds a log-handler to the logger.
The ownership is transferred to the logger.
| void Logger::remHandler | ( | LogHandler * | handler | ) |
Removes a log-handler from the logger.
The ownership is transferred back to the caller.