C++日志程序库 RLog

码农软件 · 软件分类 · 日志工具(Logging) · 2019-09-21 08:44:28

软件介绍

RLog是一个灵活的C++日志程序库。RLog高度优化了不用实际输出Log信息的分支,因此RLog可以留在发布产品中,并可以按需开启输出。

示例代码:

// create custom logging channel (part of debug hierarchy)
// Any subscriber to 'debug' will also pick up this sub channel,
// or it can be subscribed to directly.
static RLogChannel *timeChannel = DEF_CHANNEL("debug/timeStamp", Log_Debug);

void func(int foo)
{
    // log to the 'debug' channel
    rDebug("foo = %i", foo);
    int ans = 6 * 9;
    if(ans != 42)
        rWarning("ans = %i, expecting 42", ans); // log to warning channel
    // log to error channel
    rError("I'm sorry %s, I can't do that (error code %i)", name, errno);

    // log to custom channel
    // Note: time() never gets called unless there are subscribers to this message
    rLog(timeChannel, "the time is now %i", (int)time(NULL));
}

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

黑客与画家

黑客与画家

[美] Paul Graham / 阮一峰 / 人民邮电出版社 / 2011-4 / 49.00元

本书是硅谷创业之父Paul Graham 的文集,主要介绍黑客即优秀程序员的爱好和动机,讨论黑客成长、黑客对世界的贡献以及编程语言和黑客工作方法等所有对计算机时代感兴趣的人的一些话题。书中的内容不但有助于了解计算机编程的本质、互联网行业的规则,还会帮助读者了解我们这个时代,迫使读者独立思考。 本书适合所有程序员和互联网创业者,也适合一切对计算机行业感兴趣的读者。一起来看看 《黑客与画家》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

SHA 加密
SHA 加密

SHA 加密工具