forked from DSpace/DSpace
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a "container friendly" log4j2 cfg and output compose dspace log t…
…o console (DSpace#8828) Co-authored-by: Tim Donohue <[email protected]>
- Loading branch information
1 parent
7fc9135
commit b6d20ee
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- Logging configuration for DSpace container (matches log4j2.xml but to console, removing file refs & most comments) --> | ||
<Configuration strict='true' | ||
xmlns='http://logging.apache.org/log4j/2.0/config'> | ||
|
||
<Properties> | ||
<Property name='loglevel.dspace'>INFO</Property> | ||
<Property name='loglevel.other'>INFO</Property> | ||
</Properties> | ||
|
||
<Appenders> | ||
<!-- A1 is for most DSpace activity --> | ||
<Appender name='A1' | ||
type='Console' | ||
|
||
> | ||
<Layout type='PatternLayout' | ||
pattern='%d %-5p %equals{%X{correlationID}}{}{unknown} %equals{%X{requestID}}{}{unknown} %c @ %m%n'/> | ||
</Appender> | ||
|
||
<!-- A2 is for the checksum checker --> | ||
<Appender name='A2' | ||
type='Console'> | ||
<Layout type='PatternLayout' | ||
pattern='%m%n'/> | ||
</Appender> | ||
</Appenders> | ||
|
||
<Loggers> | ||
|
||
<!-- Most parts of DSpace --> | ||
<Logger name='org.dspace' | ||
level='${loglevel.dspace}' | ||
additivity='false'> | ||
<AppenderRef ref='A1'/> | ||
</Logger> | ||
|
||
<!-- The checksum checker --> | ||
<Logger name='org.dspace.checker' | ||
level='INFO' | ||
additivity='false'> | ||
<AppenderRef ref='A2'/> | ||
</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'/> | ||
</Root> | ||
</Loggers> | ||
</Configuration> |