forked from DSpace/DSpace
-
Notifications
You must be signed in to change notification settings - Fork 2
/
log4j2.xml
142 lines (127 loc) · 5.53 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?xml version="1.0" encoding="UTF-8"?>
<!-- Logging configuration for DSpace command line tools -->
<Configuration strict='true'
xmlns='http://logging.apache.org/log4j/2.0/config'>
<Properties>
<!-- Default log file directory for DSpace.
NOTE: The value of 'dspace.dir' will be replaced by its value in
your configuration when DSpace is installed. -->
<Property name='log.dir'>${log4j:configParentLocation}/../log</Property>
<!-- Log level for all DSpace-specific code (org.dspace.*)
Possible values (from most to least info):
DEBUG, INFO, WARN, ERROR, FATAL -->
<Property name='loglevel.dspace'>INFO</Property>
<!-- Log level for other third-party tools/APIs used by DSpace
Possible values (from most to least info):
DEBUG, INFO, WARN, ERROR, FATAL -->
<Property name='loglevel.other'>INFO</Property>
</Properties>
<Appenders>
<!-- A1 is for most DSpace activity -->
<Appender name='A1'
filePattern="${log.dir}/dspace.log-%d{yyyy-MM-dd}"
type='RollingFile'
fileName='${log.dir}/dspace.log'
>
<!-- NOTE: The %equals patterns are providing a default value of "unknown" if "correlationID" or
"requestID" are not currently set in the ThreadContext. -->
<Layout type='PatternLayout'
pattern='%d %-5p %equals{%X{correlationID}}{}{unknown} %equals{%X{requestID}}{}{unknown} %c @ %m%n'/>
<policies>
<policy type='TimeBasedTriggeringPolicy'>yyyy-MM-dd</policy>
</policies>
<!-- Sample deletion policy: keep last 30 archived files
<DefaultRolloverStrategy>
<Delete basePath='${log.dir}'>
<IfFileName glob='dspace.log-*'/>
<IfAccumulatedFileCount exceeds='30'/>
</Delete>
</DefaultRolloverStrategy>
-->
</Appender>
<!-- A2 is for the checksum checker -->
<Appender name='A2'
filePattern="${log.dir}/checker.log-%d{yyyy-MM-dd}"
type='RollingFile'
fileName='${log.dir}/checker.log'>
<Layout type='PatternLayout'
pattern='%m%n'/>
<policies>
<policy type='TimeBasedTriggeringPolicy'>yyyy-MM-dd</policy>
</policies>
<!-- Sample deletion policy: keep last 30 archived files
<DefaultRolloverStrategy>
<Delete basePath='${log.dir}'>
<IfFileName glob='checker.log-*'/>
<IfAccumulatedFileCount exceeds='30'/>
</Delete>
</DefaultRolloverStrategy>
-->
</Appender>
<!-- A3 is for tracking file downloads -->
<Appender name='A3'
filePattern="${log.dir}/file_downloads.log-%d{yyyy-MM-dd}"
type='RollingFile'
fileName='${log.dir}/file_downloads.log'>
<Layout type='PatternLayout'
pattern='%m%n'/>
<policies>
<policy type='TimeBasedTriggeringPolicy'>yyyy-MM-dd</policy>
</policies>
</Appender>
<!-- A4 is for Warns and errors -->
<Appender name='A4'
filePattern="${log.dir}/warn.log-%d{yyyy-MM-dd}"
type='RollingFile'
fileName='${log.dir}/warn.log'
>
<!-- NOTE: The %equals patterns are providing a default value of "unknown" if "correlationID" or
"requestID" are not currently set in the ThreadContext. -->
<Layout type='PatternLayout'
pattern='%d %-5p %equals{%X{correlationID}}{}{unknown} %equals{%X{requestID}}{}{unknown} %c @ %m%n'/>
<policies>
<policy type='TimeBasedTriggeringPolicy'>yyyy-MM-dd</policy>
</policies>
</Appender>
</Appenders>
<Loggers>
<!-- Most parts of DSpace -->
<Logger name='org.dspace'
level='${loglevel.dspace}'
additivity='false'>
<AppenderRef ref='A1'/>
<AppenderRef ref="A4" level="WARN"/>
</Logger>
<!-- The checksum checker -->
<Logger name='org.dspace.checker'
level='INFO'
additivity='false'>
<AppenderRef ref='A2'/>
</Logger>
<!-- The file downloads -->
<Logger name="org.dspace.app.statistics.clarin.ClarinMatomoBitstreamTracker"
level="INFO"
additivity="false">
<AppenderRef ref="A3"/>
</Logger>
<!-- Block services logging except on exceptions -->
<Logger name='org.dspace.kernel'
level='ERROR'/>
<Logger name='org.dspace.services'
level='ERROR'/>
<Logger name='org.dspace.servicemanager'
level='WARN'/>
<Logger name='org.dspace.providers'
level='ERROR'/>
<Logger name='org.dspace.utils'
level='ERROR'/>
<!-- Block passwords from being exposed in Axis logs. (DEBUG exposes passwords in Basic Auth) -->
<Logger name='org.apache.axis.handlers.http.HTTPAuthHandler'
level='INFO'/>
<!-- Anything not a part of DSpace -->
<Root level='${loglevel.other}'>
<AppenderRef ref='A1'/>
<AppenderRef ref="A4" level="WARN"/>
</Root>
</Loggers>
</Configuration>