-
Notifications
You must be signed in to change notification settings - Fork 0
/
log4j2.xml
35 lines (35 loc) · 1 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
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Properties>
<Property name="baseDir">logs</Property>
</Properties>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout
pattern="%d{DEFAULT} [%-5p] [%-40C{1}] [%-40M] %m%n" />
</Console>
<RollingFile name="RollingFile"
fileName="${baseDir}/jilter.log"
filePattern="${baseDir}/$${date:yyyy-MM}/jilter-%d{MM-dd-yyyy}-%i.log.gz">
<PatternLayout
pattern="%d{DEFAULT} [%-5p] [%-40C{1}] [%-40M] %m%n" />
<Policies>
<OnStartupTriggeringPolicy />
<TimeBasedTriggeringPolicy />
<CronTriggeringPolicy schedule="0 0 * * * ?" />
</Policies>
<DefaultRolloverStrategy>
<Delete basePath="${baseDir}" maxDepth="3">
<IfFileName glob="*/jilter-*.log.gz" />
<IfLastModified age="31d" />
</Delete>
</DefaultRolloverStrategy>
</RollingFile>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="Console" />
<AppenderRef ref="RollingFile" />
</Root>
</Loggers>
</Configuration>