C/C++ 日志庫:c-log
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");
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!