forked from huaweicloud/huaweicloud-sdk-java-obs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
log4j2.xml
59 lines (51 loc) · 2.46 KB
/
log4j2.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<!-- console appender -->
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout charset="UTF-8" pattern="%d{yyyy-MM-dd HH:mm:ss SSS}|%t|%-5p|%m%n" />
</Console>
<!-- north interface log -->
<RollingFile name="NorthInterfaceLogAppender" fileName="${sys:user.dir}/logs/OBS-SDK.interface_north.log"
filePattern="${sys:user.dir}/logs/OBS-SDK.interface_north-%i.log" filePermissions="rw-------">
<PatternLayout charset="UTF-8" pattern="%d{yyyy-MM-dd HH:mm:ss SSS}|%t|%-5p|%m%n" />
<SizeBasedTriggeringPolicy size="20M" />
<DefaultRolloverStrategy max="10"/>
</RollingFile>
<!-- south interface log -->
<RollingFile name="SouthInterfaceLogAppender" fileName="${sys:user.dir}/logs/OBS-SDK.interface_south.log"
filePattern="${sys:user.dir}/logs/OBS-SDK.interface_south-%i.log" filePermissions="rw-------">
<PatternLayout charset="UTF-8" pattern="%d{yyyy-MM-dd HH:mm:ss SSS}|%t|%-5p|%m%n" />
<SizeBasedTriggeringPolicy size="20M" />
<DefaultRolloverStrategy max="10"/>
</RollingFile>
<!-- access log -->
<RollingFile name="AccessLogAppender" fileName="${sys:user.dir}/logs/OBS-SDK.access.log"
filePattern="${sys:user.dir}/logs/OBS-SDK.access-%i.log" filePermissions="rw-------">
<PatternLayout charset="UTF-8" pattern="%t|%-5p|%m%n" />
<SizeBasedTriggeringPolicy size="20M" />
<DefaultRolloverStrategy max="10"/>
</RollingFile>
</Appenders>
<Loggers>
<!-- north log -->
<Logger name="com.obs.services.AbstractClient" level="WARN"
additivity="false">
<AppenderRef ref="NorthInterfaceLogAppender" />
</Logger>
<!-- south log -->
<Logger name="com.obs.services.internal.RestStorageService" level="WARN"
additivity="false">
<AppenderRef ref="SouthInterfaceLogAppender" />
</Logger>
<!-- access log -->
<Logger name="com.obs.log.AccessLogger" level="WARN"
additivity="false">
<AppenderRef ref="AccessLogAppender" />
</Logger>
<!-- console log -->
<Root level="WARN">
<AppenderRef ref="Console" />
</Root>
</Loggers>
</Configuration>