libdrmconf
0.10.4
A library to program DMR radios.
|
A log-handler that dumps log-messages into files. More...
#include <logger.hh>
Public Member Functions | |
FileLogHandler (const QString &file, LogMessage::Level minLevel=LogMessage::DEBUG, QObject *parent=nullptr) | |
Constructor. More... | |
virtual | ~FileLogHandler () |
Destructor, closes log file. | |
LogMessage::Level | minLevel () const |
Returns the minimum log level. | |
void | setMinLevel (LogMessage::Level minLevel) |
Resets the minimum log level. | |
void | handle (const LogMessage &message) |
Callback to handle log messages. | |
Public Member Functions inherited from LogHandler | |
LogHandler (QObject *parent=nullptr) | |
Constructor. | |
virtual | ~LogHandler () |
Destructor. | |
Protected Attributes | |
QFile | _file |
The file to log into. | |
QTextStream | _stream |
A reference to the text stream to log into. | |
LogMessage::Level | _minLevel |
The minimum log level. | |
A log-handler that dumps log-messages into files.
FileLogHandler::FileLogHandler | ( | const QString & | file, |
LogMessage::Level | minLevel = LogMessage::DEBUG , |
||
QObject * | parent = nullptr |
||
) |
Constructor.
file | Specifies the filename to log to. |
minLevel | Specifies the minimum log-level to log. |
parent | Specifies the parent object. |