C++11 日志框架 g2log

码农软件 · 软件分类 · 日志工具(Logging) · 2019-09-20 20:57:50

软件介绍

g2log 是一个简单高效的异步日志工具,使用 C++11 实现。

g2log/CodeProjectAsynchronousvsSynchronous.jpg

示例代码:

#include "g2log.h"
int main(int argc, char** argv)
{
    g2logWorker g2log(argv[0], "/tmp/whatever-directory-path-you-want/");
    g2::initializeLogging(&g2log);
    
    LOG(INFO) << "Simple to use with streaming syntax, easy as ABC or " << 123;
    LOGF(WARNING, "Printf-style syntax is also %s", "available");
    
    LOGF(FATAL, "This %s is FATAL. After log flush -> Abort()", "message");
    // or using the stream API
    LOG(FATAL) << "This message is FATAL. After log flush -> Abort()";
}

本文地址:https://www.codercto.com/soft/d/15040.html

Head First WordPress

Head First WordPress

Siarto Jeff / O'Reilly Media / 2010-02-15 / USD 34.99

Whether you're promoting your business or writing about your travel adventures, "Head First WordPress" will teach you not only how to make your blog look unique and attention-grabbing, but also how to......一起来看看 《Head First WordPress》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

MD5 加密
MD5 加密

MD5 加密工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具