26 #ifndef CAMITKLOGGER_H 27 #define CAMITKLOGGER_H 138 void setLogLevel(
LogLevel level)
override;
142 void setLogToStandardOutput(
bool writeToStdOut)
override;
147 bool getLogToStandardOutput()
override;
156 bool setLogToFile(
bool writeToFile)
override;
174 bool setLogFileDirectory(QDir directoryName,
bool moveExistingLogFile =
true)
override;
177 bool getLogToFile()
override;
180 QFileInfo getLogFileInfo()
override;
187 void setMessageBoxLevel(
LogLevel level)
override;
190 LogLevel getMessageBoxLevel()
override;
196 void setDebugInformation(
bool)
override;
199 bool getDebugInformation()
override;
206 void setTimeStampInformation(
bool showTimeStamp)
override;
209 bool getTimeStampInformation()
override;
222 QString log(
const QString msg,
const LogLevel level,
char const* fileName,
char const* methodName,
int lineNumber,
const QObject* sender =
nullptr)
override;
227 virtual QString buildLogMessage(QString message,
LogLevel level,
char const* fileName,
char const* methodName,
int lineNumber,
const QObject* sender =
nullptr);
231 QString getCamiTKAPIInformation(
const QObject* sender);
234 bool openLogFile(
bool moveFile =
false, QFileInfo fileToMove = QFileInfo());
273 #endif // CAMITKLOGGER_H QDateTime logStartTime
Instanciation time.
Definition: CamiTKLogger.h:267
InterfaceLogger::LogLevel level
current log level
Definition: CamiTKLogger.h:240
InterfaceLogger::LogLevel messageBoxLevel
current level for message boxes
Definition: CamiTKLogger.h:243
QTextStream * logStream
Current stream to output to the log file.
Definition: CamiTKLogger.h:264
bool displayTimeStampInformation
display time stamp information (in the form "yyyy-MM-dd HH:mm:ss.zzz")
Definition: CamiTKLogger.h:255
Definition: Action.cpp:36
#define CAMITK_API
Definition: CamiTKAPI.h:49
QFile * logFile
Current log file (the stream is flushed log message by log message)
Definition: CamiTKLogger.h:261
LogLevel
: how chatty should the log output be...
Definition: InterfaceLogger.h:60
bool displayDebugInformation
display debug information (file/class name, method name and line number)
Definition: CamiTKLogger.h:252
QDir logFileDirectory
Current directory for the log file.
Definition: CamiTKLogger.h:258
The CamiTK logger interface provides a flexible tracing system to CamiTK applications.
Definition: InterfaceLogger.h:51
This is the default logger for CamiTK.
Definition: CamiTKLogger.h:123
bool logToStdOut
is the logger currently writing everything to the standard output
Definition: CamiTKLogger.h:246
bool logToFile
is the logger currently writing everything to a file
Definition: CamiTKLogger.h:249