223 QString
log(
const QString msg,
const LogLevel level,
char const* fileName,
char const* methodName,
int lineNumber,
const QObject* sender =
nullptr)
override final;
228 virtual QString
buildLogMessage(QString message,
LogLevel level,
char const* fileName,
char const* methodName,
int lineNumber,
const QObject* sender =
nullptr);
232 QString getCamiTKAPIInformation(
const QObject* sender);
235 bool openLogFile(
bool moveFile =
false, QFileInfo fileToMove = QFileInfo());
253 bool displayDebugInformation;
256 bool displayTimeStampInformation;
259 QDir logFileDirectory;
265 QTextStream* logStream;
268 QDateTime logStartTime;
#define CAMITK_API
Definition CamiTKAPI.h:66
QFileInfo getLogFileInfo() override
Definition CamiTKLogger.cpp:197
bool getTimeStampInformation() override
Definition CamiTKLogger.cpp:241
bool getLogToStandardOutput() override
check if the logger is currently writing on standard output (std::cout)
Definition CamiTKLogger.cpp:90
LogLevel getLogLevel() override
Get Current verbosity level of the log:
Definition CamiTKLogger.cpp:69
void setMessageBoxLevel(LogLevel level) override
Set the lowest log level that will open a modal message box for messages instead of simply (silently/...
Definition CamiTKLogger.cpp:207
void setDebugInformation(bool) override
Allows the logger to add debug information to the log message.
Definition CamiTKLogger.cpp:220
virtual QString buildLogMessage(QString message, LogLevel level, char const *fileName, char const *methodName, int lineNumber, const QObject *sender=nullptr)
Builds a log message of correct format.
Definition CamiTKLogger.cpp:300
LogLevel getMessageBoxLevel() override
Definition CamiTKLogger.cpp:215
bool setLogToFile(bool writeToFile) override
Allows the logger to write to the log file.
Definition CamiTKLogger.cpp:95
QString log(const QString msg, const LogLevel level, char const *fileName, char const *methodName, int lineNumber, const QObject *sender=nullptr) override final
Log a message: If the logger is allowed to write on standard output, it will display the message (and...
Definition CamiTKLogger.cpp:246
bool getDebugInformation() override
Definition CamiTKLogger.cpp:228
void setLogLevel(LogLevel level) override
Sets Current verbosity level of the log:
Definition CamiTKLogger.cpp:74
bool setLogFileDirectory(QDir directoryName, bool moveExistingLogFile=true) override
Set the specific directory to write to (default is the subdirectory "CamiTK" in the system temporary ...
Definition CamiTKLogger.cpp:111
CamiTKLogger()
Default constructor.
Definition CamiTKLogger.cpp:49
void setLogToStandardOutput(bool writeToStdOut) override
Allows the logger to write on std::cout.
Definition CamiTKLogger.cpp:82
bool getLogToFile() override
check if the logger is currently writing on a file
Definition CamiTKLogger.cpp:132
void setTimeStampInformation(bool showTimeStamp) override
By default a logger should always show the time-stamp in the form of "yyyy-MM-dd HH:mm:ss....
Definition CamiTKLogger.cpp:233
The CamiTK logger interface provides a flexible tracing system to CamiTK applications.
Definition InterfaceLogger.h:51
LogLevel
: how chatty should the log output be...
Definition InterfaceLogger.h:60