-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconfig.json
More file actions
23 lines (23 loc) · 1.35 KB
/
config.json
File metadata and controls
23 lines (23 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
"comments": [
"下面的数值都是默认生成的注释,用于说明参数填写的注意事项",
"roll_size:滚动日志的阈值,以mb为单位",
"flush_interval:日志后台刷盘的时间,以秒为单位",
"out_console:是否开启输出控制台,是bool值",
"out_file:是否开启输出日志文件,不开启请使用null值,开启请用一个文件夹目录",
"flag:用于开启日志对应输出的数据内容,有date,time,line,file,short_file,tid,func七种,可以通过+号来同时开启,当然也可直接使用default,它表示除tid以外的所有选项",
"level:用于规定全局的最低输出等级,有trace,debug,info,warn,error,fatal,默认使用debug",
"formatter:用于规定全局的日志格式化方式,有default,colorful,custom这三种,默认采取default,如果使用custom,则需要添加fmt_string",
"fmt_string:仅当formatter选择custom后用于设定自定义的formatter,对应的数据表示如下:%n:name %T:time,%t:tid,%F:filepath,%f:func,%e:error info,%L:long levelText,%l:short levelText,%v:message ,%c color start %C color end"
],
"elog": {
"name": "elog4cpp",
"flag": "default+tid+short_file+func",
"flush_interval": 3,
"formatter": "default",
"level": "debug",
"out_console": true,
"out_file": "null",
"roll_size": 20
}
}