UniversalIndentGUI 1.2.0
Public Member Functions | Static Public Member Functions | Private Types | Private Slots | Private Member Functions | Private Attributes | Static Private Attributes
tschweitzer::debugging::TSLogger Class Reference

#include <TSLogger.h>

Inheritance diagram for tschweitzer::debugging::TSLogger:
Inheritance graph
[legend]

List of all members.

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 TSLoggergetInstance ()
 Returns the only existing instance of TSLogger. If the instance doesn't exist, it will be created.
static TSLoggergetInstance (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

Detailed Description

Definition at line 34 of file TSLogger.h.


Member Enumeration Documentation

Enumerator:
NOTINITIALZED 
INITIALIZING 
INITIALZED 

Definition at line 51 of file TSLogger.h.


Constructor & Destructor Documentation

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().

Here is the call graph for this function:


Member Function Documentation

void TSLogger::deleteInstance ( ) [static]

Deletes the existing _instance of TSLogger.

Definition at line 173 of file TSLogger.cpp.

References _instance.

Referenced by main().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

TSLogger * TSLogger::_instance = NULL [static, private]

Definition at line 55 of file TSLogger.h.

Referenced by deleteInstance(), and messageHandler().

Definition at line 57 of file TSLogger.h.

Referenced by openLogFileFolder(), and writeToLogFile().

Referenced by TSLogger(), and writeToLogFile().

Definition at line 58 of file TSLogger.h.

Referenced by writeToLogFile().

Definition at line 49 of file TSLogger.h.

Referenced by messageHandler(), TSLogger(), and writeToLogFile().

Definition at line 56 of file TSLogger.h.

Referenced by messageHandler(), setVerboseLevel(), and TSLogger().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines