c-log - C/C++ 日志库


GPL
跨平台
C/C++

软件简介

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");