-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog4cpp.conf
More file actions
24 lines (16 loc) · 833 Bytes
/
log4cpp.conf
File metadata and controls
24 lines (16 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 定义了3个category sub1, sub2, sub3
# 其中sub2和sub3设置了additivity属性为false;sub1的additivity属性默认为true
rootCategory=DEBUG, rootAppender
category.sub1=DEBUG,A1
# 定义rootAppender类型和layout属性,这里使用了BasicLayout
appender.rootAppender=org.apache.log4cpp.ConsoleAppender
appender.rootAppender.layout=org.apache.log4cpp.PatternLayout
appender.rootAppender.layout.ConversionPattern=%d{%Y-%m-%d %H:%M:%S} [%p]: [%c] %m%n
#定义A1的属性,这里使用了SimpleLayout
appender.A1=org.apache.log4cpp.RollingFileAppender
appender.A1.fileName=vascuview.log
appender.A1.maxFileSize=10*1024*1024
appender.A1.maxBackupIndex=3
appender.A1.backupPattern=%Y-%m-%d
appender.A1.layout=org.apache.log4cpp.PatternLayout
appender.A1.layout.ConversionPattern=%d{%Y-%m-%d %H:%M:%S} [%p]: [%c] %m%n