This action will force synchronization from Fifi Lyu/zpsoe.zlog, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
满足简单需求的日志库,仅有3个头文件和1个源代码文件。无任何第三方库依赖。可直接放到项目中使用。
支持平台:Windows 以及 Linux
......
cout << "\n----- TestCase1: 输出到 stdout -----" << endl;
G_LogConfig.level = LOG_TRACE;
G_LogConfig.output_to = LOGOUTPUTSTREAM_STDOUT;print_log(LOG_TRACE, "TestCase.%d: This is %s log message", 1, "LOG_TRACE");
print_log(LOG_DEBUG, "TestCase.%d: This is %s log message", 1, "LOG_DEBUG");
print_log(LOG_INFO, "TestCase.%d: This is %s log message", 1, "LOG_INFO");
print_log(LOG_WARN, "TestCase.%d: This is %s log message", 1, "LOG_WARN");
print_log(LOG_ERROR, "TestCase.%d: This is %s log message", 1, "LOG_ERROR");
print_log(LOG_FATAL, "TestCase.%d: This is %s log message\n", 1, "LOG_FATAL");
// 不会输出任何日志
print_log(LOG_OFF, "TestCase.%d: This is %s log message", 1, "LOG_OFF");
......
####----- TestCase1: 输出到 stdout -----
[2014-10-17 10:30:28] [3039] /home/fifilyu/workspace/zpsoe.zlog/zlog_test/main.cxx:19 TestCase.1: This is LOG_TRACE log message
[2014-10-17 10:30:28] [3039] /home/fifilyu/workspace/zpsoe.zlog/zlog_test/main.cxx:20 TestCase.1: This is LOG_DEBUG log message
[2014-10-17 10:30:28] [3039] TestCase.1: This is LOG_INFO log message
[2014-10-17 10:30:28] [3039] TestCase.1: This is LOG_WARN log message
[2014-10-17 10:30:28] [3039] TestCase.1: This is LOG_ERROR log message
[2014-10-17 10:30:28] [3039] TestCase.1: This is LOG_FATAL log message
mkdir zpsoe.zlog_build
cd zpsoe.zlog_build
cmake ../zpsoe.zlog
make 或者 Visual Studio 编译
bin\Release\zlog_test.exe
bin\Release\zpsoe_zlog.dll
lib\Release\zpsoe_zlog.lib
lib\Release\zpsoe_zlogS.lib # 静态库
bin/zlog_test
lib/libzpsoe_zlogS.a # 静态库
lib/libzpsoe_zlog.so
当然,也可以make install,将bin、include以及lib安装到系统默认路径 /usr/local/zpsoe.zlog 或者 C:\Program Files\zpsoe.zlog
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。