libdrmconf  0.10.4
A library to program DMR radios.
Public Member Functions | Protected Attributes | List of all members
FileLogHandler Class Reference

A log-handler that dumps log-messages into files. More...

#include <logger.hh>

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

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.
 

Detailed Description

A log-handler that dumps log-messages into files.

Constructor & Destructor Documentation

◆ FileLogHandler()

FileLogHandler::FileLogHandler ( const QString &  file,
LogMessage::Level  minLevel = LogMessage::DEBUG,
QObject *  parent = nullptr 
)

Constructor.

Parameters
fileSpecifies the filename to log to.
minLevelSpecifies the minimum log-level to log.
parentSpecifies the parent object.

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