QtWebApp
dualfilelogger.cpp
Go to the documentation of this file.
1
6#include "dualfilelogger.h"
7
8using namespace stefanfrings;
9
10DualFileLogger::DualFileLogger(QSettings *firstSettings, QSettings* secondSettings, const int refreshInterval, QObject* parent)
11 :Logger(parent)
12{
13 firstLogger=new FileLogger(firstSettings, refreshInterval, this);
14 secondLogger=new FileLogger(secondSettings, refreshInterval, this);
15}
16
17void DualFileLogger::log(const QtMsgType type, const QString& message, const QString &file, const QString &function, const int line)
18{
19 firstLogger->log(type,message,file,function,line);
20 secondLogger->log(type,message,file,function,line);
21}
22
23void DualFileLogger::clear(const bool buffer, const bool variables)
24{
25 firstLogger->clear(buffer,variables);
26 secondLogger->clear(buffer,variables);
27}
virtual void clear(const bool buffer=true, const bool variables=true)
Clear the thread-local data of the current thread.
virtual void log(const QtMsgType type, const QString &message, const QString &file="", const QString &function="", const int line=0)
Decorate and log the message, if type>=minLevel.
Logger that uses a text file for output.
Definition: filelogger.h:56
Decorates and writes log messages to the console, stderr.
Definition: logger.h:52
virtual void clear(const bool buffer=true, const bool variables=true)
Clear the thread-local data of the current thread.
Definition: logger.cpp:140
virtual void log(const QtMsgType type, const QString &message, const QString &file="", const QString &function="", const int line=0)
Decorate and log the message, if type>=minLevel.
Definition: logger.cpp:160