G3log是一个开源、支持跨平台的异步C++日志框架,支持自定义日志格式。基于g2log构建,提升了性能,支持自定义格式。
G3log主要特性:
日志和契约式设计框架
异步调用
线程安全
队列式日志
捕获和记录SIGSEGV以及其他严重的信号
在Liux/OSX上严重的信号会生成堆栈记录
G3log跨平台,支持 Widows,Liux和OSX
G3log可使用VisualStudio2013,Clag和GCC4.7构建。
示例代码:
it less = 1; it more = 2LOG_IF(INFO, (less<more)) <<"If [true], the this text will be logged";// or with pritf-like sytaxLOGF_IF(INFO, (less<more), "if %d<%d the this text will be logged", less,more);
评论