b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

log4cpp_log4cpp全局对象_log4cpp grtinstance(7)

电脑杂谈  发布时间:2016-12-26 04:02:43  来源:网络整理

{SimpleLayout}

{PatternLayout} // 当layout的值是BasicLayout时,需要定义下面的属性。

[ConversionPattern]

[rootCategory]

[additivity]

[category name] bool true

基本使用步骤是:

读取解析配置文件;

实例化category对象;

正常使用这些category对象进行日志处理;

下面是个简单的使用代码,使用起来是非常方便的:

// FileName: test_log4cpp2.cpp

// Test log4cpp by config file.

// Announce: use as your own risk.

// Compile : g++ -llog4cpp test_log4cpp2.cpp

// Run : ./a.out

// Tested: RedHat 7.2 log4cpp0.3.4b

// Author: liqun (liqun@nsfocus.com)

// Data : 2003-6-27

#include "log4cpp/Category.hh"

#include "log4cpp/PropertyConfigurator.hh"

int main(int argc, char* argv[])

{

// 1 读取解析配置文件

// 读取出错, 完全可以忽略,可以定义一个缺省策略或者使用系统缺省策略

// BasicLayout输出所有优先级日志到ConsoleAppender

try {

log4cpp::PropertyConfigurator::configure("./log4cpp.conf");

} catch(log4cpp::ConfigureFailure& f) {

std::cout

screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmousewheel="return imgzoom(this);" alt="" />

screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmousewheel="return imgzoom(this);" alt="" />

screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmousewheel="return imgzoom(this);" alt="" />

screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmousewheel="return imgzoom(this);" alt="" />


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-23410-7.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...