-
Notifications
You must be signed in to change notification settings - Fork 2
/
log4j2.xml
53 lines (53 loc) · 2.16 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
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Properties>
<Property name="defaultLogDir">/tmp/opslogs/logs</Property>
<Property name="defaultPatternLayout">%d{yyyyMMdd HH:mm:ss.SSS}\t\t%msg%n</Property>
<Property name="briefPatternLayout">%d{HH:mm:ss.SSS}\t\t%msg%n</Property>
</Properties>
<Appenders>
<Console name="Console" target="SYSTEM_ERR">
<PatternLayout pattern="${defaultPatternLayout}"/>
<ThresholdFilter level="ERROR" onMatch="DENY" onMismatch="NEUTRAL"/>
</Console>
<Console name="ConsoleError" target="SYSTEM_ERR">
<PatternLayout pattern="ERROR : ${defaultPatternLayout}"/>
<ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY"/>
</Console>
<RollingFile name="RollingLogFile" filePattern="${defaultLogDir}/%d{yyyyMMddHH}.log">
<PatternLayout pattern="${defaultPatternLayout}%ex{0}"/>
<Policies>
<TimeBasedTriggeringPolicy/>
</Policies>
</RollingFile>
<RollingFile name="RollingErrFile" filePattern="${defaultLogDir}/err_%d{yyyyMMdd}.log">
<PatternLayout pattern="${defaultPatternLayout}"/>
<Policies>
<TimeBasedTriggeringPolicy/>
</Policies>
</RollingFile>
<RollingFile name="RollingApiFile" filePattern="${defaultLogDir}/api_%d{yyyyMMddHH}.log">
<PatternLayout pattern="${briefPatternLayout}"/>
<MarkerFilter marker="OPS_API_CALL" onMatch="ACCEPT" onMismatch="DENY"/>
<Policies>
<TimeBasedTriggeringPolicy/>
</Policies>
</RollingFile>
<RollingFile name="RollingXmlFile" filePattern="${defaultLogDir}/xml_%d{yyyyMMddHH}.log">
<PatternLayout pattern="%msg%n"/>
<MarkerFilter marker="OPS_XML" onMatch="ACCEPT" onMismatch="DENY"/>
<Policies>
<TimeBasedTriggeringPolicy/>
</Policies>
</RollingFile>
</Appenders>
<Loggers>
<Root level="all">
<AppenderRef ref="RollingLogFile" level="DEBUG"/>
<AppenderRef ref="RollingErrFile" level="ERROR"/>
<AppenderRef ref="RollingApiFile" level="TRACE"/>
<AppenderRef ref="Console" level="INFO"/>
<AppenderRef ref="ConsoleError" level="ERROR"/>
</Root>
</Loggers>
</Configuration>