QtWebApp
dualfilelogger.h
Go to the documentation of this file.
1
6#ifndef DUALFILELOGGER_H
7#define DUALFILELOGGER_H
8
9#include <QString>
10#include <QSettings>
11#include <QtGlobal>
12#include "logglobal.h"
13#include "logger.h"
14#include "filelogger.h"
15
16namespace stefanfrings {
17
28class DECLSPEC DualFileLogger : public Logger {
29 Q_OBJECT
30 Q_DISABLE_COPY(DualFileLogger)
31public:
32
46 DualFileLogger(QSettings* firstSettings, QSettings* secondSettings,
47 const int refreshInterval=10000, QObject *parent = nullptr);
48
59 virtual void log(const QtMsgType type, const QString& message, const QString &file="",
60 const QString &function="", const int line=0);
61
68 virtual void clear(const bool buffer=true, const bool variables=true);
69
70private:
71
73 FileLogger* firstLogger;
74
76 FileLogger* secondLogger;
77
78};
79
80} // end of namespace
81
82#endif // DUALFILELOGGER_H
Writes log messages into two log files simultaneously.
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