-
Notifications
You must be signed in to change notification settings - Fork 0
/
log4j.xml
76 lines (71 loc) · 3.71 KB
/
log4j.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Appenders>
<!--=========================-->
<!-- Console logging -->
<!--=========================-->
<Console name="SysOut" target="SYSTEM_OUT">
<PatternLayout
pattern="%style{[%d{HH:mm:ss}]}{blue} %highlight{[%t/%level]}{FATAL=red, ERROR=red, WARN=yellow, INFO=green, DEBUG=darkGray, TRACE=blue} %style{(%logger{1}/%marker{1})}{cyan} %highlight{%msg%n}{FATAL=red, ERROR=red, WARN=normal, INFO=normal, DEBUG=normal, TRACE=normal}"
disableAnsi="false"/>
</Console>
<!--=======================-->
<!-- Normal log file -->
<!--=======================-->
<RollingRandomAccessFile name="LatestFile" fileName="logs/latest.log"
filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level] (%logger) %msg%n"/>
<Policies>
<TimeBasedTriggeringPolicy/>
<OnStartupTriggeringPolicy/>
</Policies>
</RollingRandomAccessFile>
<RollingRandomAccessFile name="LatestFileAnsi" fileName="logs/latest.log.ansi"
filePattern="logs/%d{yyyy-MM-dd}-%i.log.ansi.gz">
<PatternLayout
pattern="%style{[%d{HH:mm:ss}]}{blue} %highlight{[%t/%level]}{FATAL=red, ERROR=red, WARN=yellow, INFO=green, DEBUG=darkGray, TRACE=blue} %style{(%logger{1}/%marker{1})}{cyan} %highlight{%msg%n}{FATAL=red, ERROR=red, WARN=normal, INFO=normal, DEBUG=normal, TRACE=normal}"
disableAnsi="false"/>
<Policies>
<TimeBasedTriggeringPolicy/>
<OnStartupTriggeringPolicy/>
</Policies>
</RollingRandomAccessFile>
<!--======================-->
<!-- Debug log file -->
<!--======================-->
<RollingRandomAccessFile name="DebugFile" fileName="logs/debug.log" filePattern="logs/debug-%i.log.gz">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level] (%logger) %msg%n"/>
<!--========================-->
<!-- Keep 7 files max -->
<!--========================-->
<DefaultRolloverStrategy max="7" fileIndex="min"/>
<Policies>
<SizeBasedTriggeringPolicy size="200MB"/>
<OnStartupTriggeringPolicy/>
</Policies>
</RollingRandomAccessFile>
<RollingRandomAccessFile name="DebugFileAnsi" fileName="logs/debug.log.ansi" filePattern="logs/debug-%i.log.ansi.gz">
<PatternLayout
pattern="%style{[%d{HH:mm:ss}]}{blue} %highlight{[%t/%level]}{FATAL=red, ERROR=red, WARN=yellow, INFO=green, DEBUG=darkGray, TRACE=blue} %style{(%logger{1}/%marker{1})}{cyan} %highlight{%msg%n}{FATAL=red, ERROR=red, WARN=normal, INFO=normal, DEBUG=normal, TRACE=normal}"
disableAnsi="false"/>
<!--========================-->
<!-- Keep 7 files max -->
<!--========================-->
<DefaultRolloverStrategy max="7" fileIndex="min"/>
<Policies>
<SizeBasedTriggeringPolicy size="200MB"/>
<OnStartupTriggeringPolicy/>
</Policies>
</RollingRandomAccessFile>
</Appenders>
<Loggers>
<!--======================-->
<!-- Logging levels -->
<!--======================-->
<Root level="all">
<AppenderRef ref="SysOut" level="TRACE"/>
<AppenderRef ref="LatestFile" level="INFO"/>
<AppenderRef ref="DebugFile" level="TRACE"/>
</Root>
</Loggers>
</Configuration>