-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlog4j2.xml
34 lines (33 loc) · 1.55 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
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="WARN">
<CustomLevels>
<CustomLevel name="RESULT" intLevel="450" />
</CustomLevels>
<appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n"/>
<Filters>
<!-- Deny warn, error and fatal messages -->
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
<!-- Accept RESULT, info, warn, error, fatal and deny debug/trace -->
<ThresholdFilter level="RESULT" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
</Console>
<Console name="ConsoleErr" target="SYSTEM_ERR">
<PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n"/>
</Console>
<File name="record" fileName="logs/record.log">
<PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n"/>
</File>
</appenders>
<loggers>
<root level="debug">
<appender-ref ref="Console" level="RESULT"/>
<appender-ref ref="record" level="debug"/>
<appender-ref ref="ConsoleErr" level="error"/>
</root>
</loggers>
</configuration>