forked from clarin-eric/oai-harvest-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
log4j2.xml
65 lines (51 loc) · 2.4 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
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
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="INFO" name="harvester-config">
<Properties>
<Property name="LOG_DIR">${sys:logdir}</Property>
<Property name="ARCHIVE">${LOG_DIR}/archive</Property>
<Property name="PATTERN">%d{ABSOLUTE} %level{length=5} [%thread] %logger{1} - %msg%n</Property>
</Properties>
<Appenders>
<RollingFile name="fileWriter"
fileName="${LOG_DIR}/oai-harvester.log"
filePattern="${ARCHIVE}/oai-harvester.log.%d{yyyy-MM-dd}.gz">
<PatternLayout pattern="${PATTERN}"/>
<Policies>
<OnStartupTriggeringPolicy/>
<TimeBasedTriggeringPolicy interval="3" modulate="true" />
</Policies>
</RollingFile>
<Routing name="RoutingAppender">
<Routes pattern="$${ctx:logFileName}">
<!-- This route is chosen if ThreadContext has a value for logFileName
The value dynamically determines the name of the log file. -->
<Route>
<RollingFile name="Rolling-${ctx:logFileName}"
fileName="${LOG_DIR}/${ctx:logFileName}.log"
filePattern="${ARCHIVE}/${ctx:logFileName}.log.%d{yyyy-MM-dd}.gz">
<PatternLayout pattern="${PATTERN}" />
<Policies>
<OnStartupTriggeringPolicy/>
<!--<SizeBasedTriggeringPolicy size="10MB" />-->
<TimeBasedTriggeringPolicy interval="3" modulate="true" />
</Policies>
</RollingFile>
</Route>
<!-- By having this set to ${ctx:logFileName} it will match when filename
is not set in the context -->
<Route ref="fileWriter" key="${ctx:logFileName}"/>
</Routes>
</Routing>
</Appenders>
<Loggers>
<Logger name="nl.mpi.oai.harvester" level="INFO" additivity="false">
<AppenderRef ref="RoutingAppender"/>
</Logger>
<Logger name="ORG.oclc.oai.harvester2.verb" level="INFO" additivity="false">
<AppenderRef ref="RoutingAppender"/>
</Logger>
<Root level="INFO">
<AppenderRef ref="fileWriter"/>
</Root>
</Loggers>
</Configuration>