-
Notifications
You must be signed in to change notification settings - Fork 2
/
log4j.xml
43 lines (34 loc) · 996 Bytes
/
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
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="OFF">
<Properties>
<Property name="LOG_LOC">logs</Property>
<Property name="MAX">5</Property>
<Property name="LOG_PATTERN">%d{yyyy.MM.dd HH:mm:ss.SSS} [%p] %c: %m%n
</Property>
</Properties>
<Appenders>
<RollingFile name="FILE" fileName="${LOG_LOC}/main.log"
filePattern="${LOG_LOC}/main.%i.log">
<PatternLayout>
<Pattern>${LOG_PATTERN}</Pattern>
</PatternLayout>
<Policies>
<OnStartupTriggeringPolicy />
</Policies>
<DefaultRolloverStrategy max="${MAX}" />
</RollingFile>
<Console name="STDOUT" target="SYSTEM_OUT" follow="true">
<PatternLayout pattern="${LOG_PATTERN}" />
</Console>
</Appenders>
<Loggers>
<Logger name="com.roytuts" level="debug" />
<Logger name="file" level="debug" additivity="false">
<appender-ref ref="FILE" />
</Logger>
<Root level="warn">
<AppenderRef ref="FILE" />
<AppenderRef ref="STDOUT" />
</Root>
</Loggers>
</Configuration>