20#ifndef LIBREPCB_CORE_DEBUG_H
21#define LIBREPCB_CORE_DEBUG_H
173 static void messageHandler(QtMsgType type,
const QMessageLogContext& context,
The Debug class provides some methods for debugging/logging.
Definition: debug.h:58
QMutex mMutex
for thread safety
Definition: debug.h:184
DebugLevel_t mDebugLevelLogFile
the current debug level for the log file
Definition: debug.h:180
Debug & operator=(const Debug &rhs)=delete
QTextStream * mStderrStream
the stream to stderr
Definition: debug.h:181
DebugLevel_t mDebugLevelStderr
the current debug level for the stderr output
Definition: debug.h:178
void print(DebugLevel_t level, const QString &msg, const char *file, int line)
Print a message to stderr/logfile (with respect to the current debug level)
Definition: debug.cpp:118
Debug()
Definition: debug.cpp:38
DebugLevel_t getDebugLevelStderr() const
Get the current debug level for the stderr output.
Definition: debug.cpp:106
static void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
The message handler for qDebug(), qWarning(), qCritical() and qFatal()
Definition: debug.cpp:176
const FilePath & getLogFilepath() const
Get the filename of the log file (even if file logging is disabled)
Definition: debug.cpp:114
static Debug * instance()
Get a pointer to the instance of the singleton Debug object.
Definition: debug.h:153
Debug(const Debug &other)=delete
void setDebugLevelLogFile(DebugLevel_t level)
Set the debug level for the log file.
Definition: debug.cpp:76
QFile * mLogFile
NULL if file logging is disabled.
Definition: debug.h:183
void setDebugLevelStderr(DebugLevel_t level)
Set the debug level for the stderr output.
Definition: debug.cpp:72
FilePath mLogFilepath
the filepath for the log file
Definition: debug.h:182
~Debug()
Definition: debug.cpp:57
DebugLevel_t
Definition: debug.h:66
DebugLevel_t getDebugLevelLogFile() const
Get the current debug level for the log file.
Definition: debug.cpp:110
The Exception class.
Definition: exceptions.h:84
This class represents absolute, well-formatted paths to files or directories.
Definition: filepath.h:129
Definition: occmodel.cpp:77