TaoLogger
Qt自制简易好看的日志系统(Implement a simple and beautify log system with Qt )
Install / Use
/learn @jaredtao/TaoLoggerREADME
TaoLogger
简介
Qt制作的简易、好看的Log系统
代码量极少
麻雀虽小五脏俱全

status
| Ubuntu/MacOS | Windows |License |
| :---------------: | :-----------------: | :-----------------: |
| |
|
|
使用
源代码拷过去,在main函数的QCoreApplication/QApplication构造之后,调用一下init函数就行了。
例如:
#include "TaoLogger.h"
//省略其它头文件
...
...
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
initLog();
...
return app.exec();
}
initLog函数的定义如下:
void initLog(const QString &logPath = QStringLiteral("Log"), int logMaxCount = 1024, bool async = true);
其中logPath为log存储路径,默认为Log文件夹。
logMaxCount最大文件数,默认为1024。
async为异步存储,默认为true。
开发环境
- Qt 5.9.x Windows
原理
详细的说明看我博客: Qt自制简易好看的日志系统
联系方式:
| 作者 | 涛哥 | | ---- | -------------------------------- | | QQ | 759378563 | | 微信 | xsd2410421 | | 邮箱 | jared2020@163.com | | blog | https://jaredtao.github.io |
QQ(TIM)、微信二维码
<img src="https://gitee.com/jaredtao/jaredtao/raw/master/img/qq_connect.jpg?raw=true" width="30%" height="30%" /><img src="https://gitee.com/jaredtao/jaredtao/raw/master/img/weixin_connect.jpg?raw=true" width="30%" height="30%" />
请放心联系我,乐于提供咨询服务,也可洽谈有偿技术支持相关事宜。
打赏
<img src="https://gitee.com/jaredtao/jaredtao/raw/master/img/weixin.jpg?raw=true" width="30%" height="30%" /><img src="https://gitee.com/jaredtao/jaredtao/raw/master/img/zhifubao.jpg?raw=true" width="30%" height="30%" />
觉得分享的内容还不错, 就请作者喝杯奶茶吧~~
Related Skills
node-connect
339.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
