c-logC/C++ 日志库

联合创作 · 2023-09-30 00:41

c-log是一个稳定,高效,多线程安全,易用,简单的C/C++ 日志库,在github主页上有丰富的测试case,后续将会推迟直接输出到scribe等集中式日志收集中间件上,帮助用户更好的收集,分析日志

示例代码:

log_init(LL_TRACE, "mysql", "./log/");
log_notice("%s [time:%d]", "test calling log", time(NULL));
log_debug("debug msg,only write to log when the loglevel bigger than or equal to debug [time:%d]", time(NULL));
log_warn("warnning msg will be writing to the error files [time:%d]", time(NULL));
log_error("you also can change  number of output files by rewrite the macro_define.h");
浏览 5
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报