Skip to content

Commit

Permalink
Added a new log4j appender for logging file downloads into `file_down…
Browse files Browse the repository at this point in the history
…load.log` file. (#634)
  • Loading branch information
milanmajchrak authored Apr 23, 2024
1 parent 3ab14ec commit b912c93
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions dspace/config/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@
</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>
</Appenders>

<Loggers>
Expand All @@ -82,6 +94,13 @@
<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'/>
Expand Down

0 comments on commit b912c93

Please sign in to comment.