Skip to content

一个支持将qDebug信息输出到调试窗口或文件的类。

Notifications You must be signed in to change notification settings

alvin-xian/QtLog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

QtLog

一个支持将qDebug信息输出到调试窗口或文件的类。

调用方法:

    QString location = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
    qtLog->setLogFilePath(location+"/Log");
    qtLog->setLogFileName("Qt_Log");
    qtLog->setLogFileSufix("txt");
    //调试信息输出到文件
    qDebug()<<"Log in file:"<<qtLog->logFilePath();
    qtLog->setLogMode(QtLog::File);
    qDebug()<<"Log in file "<<qtLog->logFilePath();
    //调试信息输出到命令行
    qtLog->setLogMode(QtLog::Qt);

输出到命令行

img

输出到文件

img

About

一个支持将qDebug信息输出到调试窗口或文件的类。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published