Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions dspace/config/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,32 @@
<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}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not only warnings - maybe name it like error-warn.log..

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so debug would be called debug-info-warn-wrror-fatal.log? I don't agree with this idea.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but I would not search errors in the warn.log. From the name it should be clear that there are warnings and errors.

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 -->
Expand Down Expand Up @@ -119,6 +136,7 @@
<!-- Anything not a part of DSpace -->
<Root level='${loglevel.other}'>
<AppenderRef ref='A1'/>
<AppenderRef ref="A4" level="WARN"/>
</Root>
</Loggers>
</Configuration>