C++ 的日志库 EzLogger
- 授权协议: BSD
- 开发语言: C/C++
- 操作系统: 跨平台
- 软件首页: http://axter.com/ezlogger/index.htm
- 软件文档: http://axter.com/ezlogger/ezlogger_chm.zip
软件介绍
EzLogger 是一个 C++ 的日志库,支持 C++ 风格的 stream 操作符和 C 语言的 printf 函数。
示例代码:
// Example code for EZLOGGER macros
#include "ezlogger_headers.hpp"
void ezlogger_simple_example()
{
int i = 123;
std::string somedata = "Hello World";
//Simple usage with standard verbosity level
EZLOGGERSTREAM << somedata << " " << i << std::endl;
//Can use alternate stream
EZLOGGERSTREAM2(std::cerr) << somedata << " next line " << i << std::endl;
//Verbosity level logging example
EZLOGGERVLSTREAM(axter::log_often) << somedata << " " << i << std::endl;
//Complex extended data example
EZLOGGERVLSTREAM(axter::levels(axter::log_often, axter::warn, __FUNCSIG__ /*or GNU PRETTY_FUNCTION*/, "Xyz Facility")) << somedata << " " << i << std::endl;
}
