You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
971 B
39 lines
971 B
/* |
|
* loggerwithfile.cpp |
|
* |
|
* Created on: Nov 11, 2017 |
|
* Author: f4exb |
|
*/ |
|
|
|
#include "loggerwithfile.h" |
|
|
|
using namespace qtwebapp; |
|
|
|
LoggerWithFile::LoggerWithFile(QObject* parent) |
|
:Logger(parent), fileLogger(0), useFileFlogger(false) |
|
{ |
|
consoleLogger = new Logger(this); |
|
} |
|
|
|
void LoggerWithFile::createFileLogger(const FileLoggerSettings& settings, const int refreshInterval) |
|
{ |
|
fileLogger = new FileLogger(settings, refreshInterval, this); |
|
} |
|
|
|
void LoggerWithFile::log(const QtMsgType type, const QString& message, const QString &file, const QString &function, const int line) |
|
{ |
|
consoleLogger->log(type,message,file,function,line); |
|
|
|
if (fileLogger && useFileFlogger) { |
|
fileLogger->log(type,message,file,function,line); |
|
} |
|
} |
|
|
|
void LoggerWithFile::clear(const bool buffer, const bool variables) |
|
{ |
|
consoleLogger->clear(buffer,variables); |
|
|
|
if (fileLogger && useFileFlogger) { |
|
fileLogger->clear(buffer,variables); |
|
} |
|
}
|
|
|