QLogger
|
Use to manage logs. More...
Public Member Functions | |
void | initLoggerDaily (const QFileInfo &file, const QTime &time, uint maxFiles, bool enableConsole) |
Use to configure daily file log sink. | |
void | initLoggerRotating (const QFileInfo &file, int maxFiles, qint64 maxSize, bool enableConsole) |
Use to configure rotating file log sink. | |
void | desinit () |
Use to release and close all used ressources. | |
void | setLevel (QtMsgType idType) |
Use to set minimum log level to use. | |
Static Public Member Functions | |
static QLoggerFactory & | instance () |
Use to get current unique instance of QLoggerFactory. | |
static const QVersionNumber & | getLibraryVersion () |
Retrieve library semantic version at runtime. | |
Use to manage logs.
This class will allow to configure and manage logs messages.
Multiple sinks are available:
initLoggerDaily()
initLoggerRotating()
void QLogger::QLoggerFactory::desinit | ( | ) |
Use to release and close all used ressources.
This method will close all used ressources and restore default log behaviour.
|
static |
Retrieve library semantic version at runtime.
QLOGGER_VERSION_ENCODE
(defined inside qloggerglobal.h file)void QLogger::QLoggerFactory::initLoggerDaily | ( | const QFileInfo & | file, |
const QTime & | time, | ||
uint | maxFiles, | ||
bool | enableConsole ) |
Use to configure daily file log sink.
[in] | file | Path of log file to use. Examples:
|
[in] | time | Daily time to use to perform rotation. |
[in] | maxFiles | Number of maximum log files in the directory allowing to manage memory used if needed. Use value 0 to disable limit of files. |
[in] | enableConsole | Set to true to enable console/terminal printing (helpful during development, useless in release mode) |
void QLogger::QLoggerFactory::initLoggerRotating | ( | const QFileInfo & | file, |
int | maxFiles, | ||
qint64 | maxSize, | ||
bool | enableConsole ) |
Use to configure rotating file log sink.
[in] | file | Path of log file to use. Examples:
|
[in] | maxFiles | Number of files to use for rotation. For example, if set to 3 , no more than 3 files will be used for rotation. |
[in] | maxFileSize | Maximum log file size in bytes. |
[in] | enableConsole | Set to true to enable console/terminal printing (helpful during development, useless in release mode) |
|
static |
Use to get current unique instance of QLoggerFactory.
void QLogger::QLoggerFactory::setLevel | ( | QtMsgType | idType | ) |
Use to set minimum log level to use.
Please refer to BaseLogger::setLevel
for more details
[in] | idType | Minimum log level to use |