iVS3D v2.0.0
Loading...
Searching...
No Matches
LogManager Class Reference

The LogManager class is a singleton which manages the logging process. It provides LogFiles that are used to log information which belongs to a single process. More...

#include <logmanager.h>

Inheritance diagram for LogManager:

Public Slots

bool slot_updateLog ()
 update is called whenever a logfile changes. This will print the current log files.
 

Public Member Functions

LogFilecreateLogFile (QString name, bool isPlugin)
 createLogFile Returns the pointer to an already existing LogFile or creates a new one if neccessary. LogFiles are used to log a single process. (e.g. Import, Export, Nth-Frame,...)
 
void deleteAllLogFiles ()
 deleteAllLogFiles Deletes all LogFiles. Every existing pointer is invalid now.
 
QJsonDocument toJSON ()
 toQJSON Returns the current state of the log files in form of a QJsonObject
 
void resetLog ()
 resetLog resets the current log and creates a new log
 
void toggleLog (bool useLog)
 toggleLog is used to enable or disable loging (-> saving the log file to disk or not)
 
void setLogDirectory (QString logDir)
 setLogDirectory changes the directory where the log file is printed to. It wont an artifical folder in between and just use the raw path instead.
 

Static Public Member Functions

static LogManagerinstance ()
 Returns the singleton instance of this class.
 

Detailed Description

The LogManager class is a singleton which manages the logging process. It provides LogFiles that are used to log information which belongs to a single process.

Author
Dominic Zahn
Date
2021/07/06

Member Function Documentation

◆ createLogFile()

LogFile * LogManager::createLogFile ( QString  name,
bool  isPlugin 
)

createLogFile Returns the pointer to an already existing LogFile or creates a new one if neccessary. LogFiles are used to log a single process. (e.g. Import, Export, Nth-Frame,...)

Parameters
nameof the returned LogFile
Returns
Pointer to a new LogFile or an already existing one with the given name

◆ instance()

LogManager & LogManager::instance ( )
static

Returns the singleton instance of this class.

Returns
Instance of this class

◆ setLogDirectory()

void LogManager::setLogDirectory ( QString  logDir)

setLogDirectory changes the directory where the log file is printed to. It wont an artifical folder in between and just use the raw path instead.

Parameters
Pathto the new directory where log files will be stored.

◆ slot_updateLog

bool LogManager::slot_updateLog ( )
slot

update is called whenever a logfile changes. This will print the current log files.

Returns
true if creation was successfull

◆ toggleLog()

void LogManager::toggleLog ( bool  useLog)

toggleLog is used to enable or disable loging (-> saving the log file to disk or not)

Parameters
useLogtrue when log is enabled, false otherwise

◆ toJSON()

QJsonDocument LogManager::toJSON ( )

toQJSON Returns the current state of the log files in form of a QJsonObject

Returns
QJsonObject which holds all currently logged informationf from all process (all LogFiles)

The documentation for this class was generated from the following files: