DtkCore
DTK Core module
Dtk::Core::DLogManager类 参考

DLogManager is the deepin user application log manager. 更多...

静态 Public 成员函数

static void registerConsoleAppender ()
 Registers the appender to write the log records to the Console. 更多...
 
static void registerFileAppender ()
 Registers the appender to write the log records to the file. 更多...
 
static QString getlogFilePath ()
 Return the path file log storage. 更多...
 
static void setlogFilePath (const QString &logFilePath)
 setlogFilePath will change log file path of registerFileAppender logFilePath is the full path of file appender log 更多...
 
static void setLogFormat (const QString &format)
 

详细描述

DLogManager is the deepin user application log manager.

\inmodule dtkcore

成员函数说明

◆ getlogFilePath()

QString Dtk::Core::DLogManager::getlogFilePath ( )
static

Return the path file log storage.

DLogManager::getlogFilePath 获取日志文件路径

默认日志路径是 ~/.cache/organizationName/applicationName.log

如果获取 HOME 环境变量失败将不写日志

参见
registerFileAppender

◆ registerConsoleAppender()

void Dtk::Core::DLogManager::registerConsoleAppender ( )
static

Registers the appender to write the log records to the Console.

参见
registerFileAppender

◆ registerFileAppender()

void Dtk::Core::DLogManager::registerFileAppender ( )
static

Registers the appender to write the log records to the file.

参见
getlogFilePath
registerConsoleAppender

◆ setlogFilePath()

void Dtk::Core::DLogManager::setlogFilePath ( const QString &  logFilePath)
static

setlogFilePath will change log file path of registerFileAppender logFilePath is the full path of file appender log

DLogManager::setlogFilePath 设置日志文件路径 logFilePath 日志文件路径

如果设置的文件路进不是文件路径将什么都不做,输出一条警告


该类的文档由以下文件生成: