Public Member Functions

DualFileLogger Class Reference

Logs messages into two log files. More...

#include <dualfilelogger.h>

Inheritance diagram for DualFileLogger:
Logger

List of all members.

Public Member Functions

 DualFileLogger (QSettings *firstSettings, QSettings *secondSettings, const int refreshInterval=10000, QObject *parent=0)
 Constructor.
virtual void log (const QtMsgType type, const QString &message)
 Decorate and log a message.

Detailed Description

Logs messages into two log files.

This is specially useful to get one less detailed logfile for normal operation plus one more detailed file for debugging.

See also:
FileLogger for a description of the required config settings.
set() describes how to set logger variables
LogMessage for a description of the message decoration.

Definition at line 23 of file dualfilelogger.h.


Constructor & Destructor Documentation

DualFileLogger::DualFileLogger ( QSettings *  firstSettings,
QSettings *  secondSettings,
const int  refreshInterval = 10000,
QObject *  parent = 0 
)

Constructor.

Parameters:
firstSettings Configuration settings for the first log file, usually stored in an INI file. Must not be 0. Settings are read from the current group, so the caller must have called settings->beginGroup(). Because the group must not change during runtime, it is recommended to provide a separate QSettings instance to the logger that is not used by other parts of the program.
secondSettings Same as firstSettings, but for the second log file.
refreshInterval Interval of checking the config settings in msec, or 0=disabled
parent Parent object

Definition at line 9 of file dualfilelogger.cpp.


Member Function Documentation

void DualFileLogger::log ( const QtMsgType  type,
const QString &  message 
) [virtual]

Decorate and log a message.

This method is thread safe.

Parameters:
type Message type (level)
message Message text
See also:
LogMessage for a description of the message decoration.

Reimplemented from Logger.

Definition at line 17 of file dualfilelogger.cpp.


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