-
Notifications
You must be signed in to change notification settings - Fork 0
/
log4j.xml
57 lines (54 loc) · 2.45 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
<?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>
<JTextAreaAppender name="jtextarea-log" maxLines="100">
<PatternLayout>
<pattern>[%d{HH:mm:ss}] [%t/%level] (%logger) %msg%n</pattern>
</PatternLayout>
</JTextAreaAppender>
<!--=======================-->
<!-- 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>
<!--======================-->
<!-- 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>
</Appenders>
<Loggers>
<!--======================-->
<!-- Logging levels -->
<!--======================-->
<Logger name="io.netty" level="WARN"/>
<Root level="all">
<AppenderRef ref="SysOut" level="TRACE"/>
<AppenderRef ref="LatestFile" level="INFO"/>
<AppenderRef ref="DebugFile" level="TRACE"/>
</Root>
</Loggers>
</Configuration>