UniversalIndentGUI 1.2.0
|
#include <TSLogger.h>
Public Member Functions | |
void | setVerboseLevel (int level) |
Calling this the verbose level can be set in a range from 0 to 3 which is equal to debug, warning, critical and fatal priority. | |
Static Public Member Functions | |
static void | deleteInstance () |
Deletes the existing _instance of TSLogger. | |
static TSLogger * | getInstance () |
Returns the only existing instance of TSLogger. If the instance doesn't exist, it will be created. | |
static TSLogger * | getInstance (int verboseLevel) |
Returns the only existing instance of TSLogger. If the instance doesn't exist, it will be created. | |
static void | messageHandler (QtMsgType type, const char *msg) |
Logs all incoming messages msg to the dialogs text edit and to the log file. | |
Private Types | |
enum | LogFileInitState { NOTINITIALZED, INITIALIZING, INITIALZED } |
Private Slots | |
void | openLogFileFolder () |
Opens the folder that contains the created log file with the name "UiGUI_log.html". | |
Private Member Functions | |
TSLogger (int verboseLevel) | |
Initializes the dialog and sets the path to the log file in the systems temporary directory. Sets the default verbose level to warning level. | |
void | writeToLogFile (const QString &message) |
Writes the message to the used log file. | |
Private Attributes | |
QFile | _logFile |
enum tschweitzer::debugging::TSLogger::LogFileInitState | _logFileInitState |
QStringList | _messageQueue |
Ui::TSLoggerDialog * | _TSLoggerDialogForm |
QtMsgType | _verboseLevel |
Static Private Attributes | |
static TSLogger * | _instance = NULL |
Definition at line 34 of file TSLogger.h.
enum tschweitzer::debugging::TSLogger::LogFileInitState [private] |
Definition at line 51 of file TSLogger.h.
TSLogger::TSLogger | ( | int | verboseLevel | ) | [private] |
Initializes the dialog and sets the path to the log file in the systems temporary directory. Sets the default verbose level to warning level.
Definition at line 79 of file TSLogger.cpp.
References _logFileInitState, _TSLoggerDialogForm, _verboseLevel, NOTINITIALZED, and openLogFileFolder().
void TSLogger::deleteInstance | ( | ) | [static] |
Deletes the existing _instance of TSLogger.
Definition at line 173 of file TSLogger.cpp.
References _instance.
Referenced by main().
TSLogger * TSLogger::getInstance | ( | int | verboseLevel | ) | [static] |
Returns the only existing instance of TSLogger. If the instance doesn't exist, it will be created.
Definition at line 55 of file TSLogger.cpp.
TSLogger * TSLogger::getInstance | ( | ) | [static] |
Returns the only existing instance of TSLogger. If the instance doesn't exist, it will be created.
Definition at line 66 of file TSLogger.cpp.
Referenced by main(), and messageHandler().
void TSLogger::messageHandler | ( | QtMsgType | type, |
const char * | msg | ||
) | [static] |
Logs all incoming messages msg to the dialogs text edit and to the log file.
Only messages whos type have a higher priority than the set verbose level are logged.
Definition at line 102 of file TSLogger.cpp.
References _instance, _TSLoggerDialogForm, _verboseLevel, getInstance(), TSLoggerInfoMsg, and writeToLogFile().
Referenced by main().
void TSLogger::openLogFileFolder | ( | ) | [private, slot] |
Opens the folder that contains the created log file with the name "UiGUI_log.html".
Definition at line 184 of file TSLogger.cpp.
References _logFile.
Referenced by TSLogger().
void TSLogger::setVerboseLevel | ( | int | level | ) |
Calling this the verbose level can be set in a range from 0 to 3 which is equal to debug, warning, critical and fatal priority.
Definition at line 160 of file TSLogger.cpp.
References _verboseLevel.
void TSLogger::writeToLogFile | ( | const QString & | message | ) | [private] |
Writes the message to the used log file.
Definition at line 192 of file TSLogger.cpp.
References _logFile, _logFileInitState, _messageQueue, _TSLoggerDialogForm, SettingsPaths::getTempPath(), INITIALIZING, INITIALZED, and NOTINITIALZED.
Referenced by messageHandler().
TSLogger * TSLogger::_instance = NULL [static, private] |
Definition at line 55 of file TSLogger.h.
Referenced by deleteInstance(), and messageHandler().
QFile tschweitzer::debugging::TSLogger::_logFile [private] |
Definition at line 57 of file TSLogger.h.
Referenced by openLogFileFolder(), and writeToLogFile().
enum tschweitzer::debugging::TSLogger::LogFileInitState tschweitzer::debugging::TSLogger::_logFileInitState [private] |
Referenced by TSLogger(), and writeToLogFile().
QStringList tschweitzer::debugging::TSLogger::_messageQueue [private] |
Definition at line 58 of file TSLogger.h.
Referenced by writeToLogFile().
Ui::TSLoggerDialog* tschweitzer::debugging::TSLogger::_TSLoggerDialogForm [private] |
Definition at line 49 of file TSLogger.h.
Referenced by messageHandler(), TSLogger(), and writeToLogFile().
QtMsgType tschweitzer::debugging::TSLogger::_verboseLevel [private] |
Definition at line 56 of file TSLogger.h.
Referenced by messageHandler(), setVerboseLevel(), and TSLogger().