kwave
18.07.70
|
#include <Logger.h>
Public Types | |
enum | LogLevel { Debug = 0, Info, Warning, Error, Fatal } |
Public Member Functions | |
Logger () | |
virtual | ~Logger () |
Static Public Member Functions | |
static bool Q_DECL_EXPORT | open (const QString &filename) |
static void Q_DECL_EXPORT | log (const QObject *sender, LogLevel level, const QString &msg) |
Static Private Attributes | |
static QFile * | m_logfile = Q_NULLPTR |
This is the main application class for Kwave. It contains functions for opening and saving files, opening new windows and holds global configuration data.
Enumerator | |
---|---|
Debug | debug message |
Info | info |
Warning | warning, something might have went wrong |
Error | error, something failed, but is recoverable |
Fatal | fatal error, not recoverable, have to exit |
Definition at line 44 of file Logger.h.
Kwave::Logger::Logger | ( | ) |
|
virtual |
Destructor.
Definition at line 49 of file Logger.cpp.
References _, Info, log(), and m_logfile.
|
static |
log a message to the log file
sender | pointer to the sender of the message, must be derived from QObject |
level | the log level / severity |
msg | the message to log |
Definition at line 103 of file Logger.cpp.
References _, ELEMENTS_OF, m_logfile, and UTF8.
Referenced by Kwave::FileContext::executeCommand(), Kwave::TopWidget::loadFile(), open(), Kwave::MainWidget::saveLabels(), Kwave::CurveWidget::savePreset(), Kwave::DebugPlugin::screenshot(), and ~Logger().
|
static |
open a log file for writing
filename | name of the log file |
Definition at line 59 of file Logger.cpp.
References _, Kwave::Append, DBG, Info, log(), m_logfile, name, and Kwave::MessageBox::warningContinueCancel().
Referenced by Kwave::App::newInstance().
|
staticprivate |