summaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2022-04-11 07:53:28 +1000
committerGitHub <noreply@github.com>2022-04-11 07:53:28 +1000
commit081c490d2c0f4fd28e76319302fb669e6b850ac8 (patch)
tree4481f7654055f8f4baa8eb2786181279bad1dc2b /archiva-modules
parent432c752e58350324cef60fcb355e31c7becf66fe (diff)
downloadarchiva-081c490d2c0f4fd28e76319302fb669e6b850ac8.tar.gz
archiva-081c490d2c0f4fd28e76319302fb669e6b850ac8.zip
add a Delete action to delete logs older than 30D (#64)
* delete old logs files * do not fork compilation Signed-off-by: Olivier Lamy <olamy@apache.org>
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j2.xml14
1 files changed, 14 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j2.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j2.xml
index 462ebddfb..352183a2b 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j2.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j2.xml
@@ -36,6 +36,13 @@
<Policies>
<TimeBasedTriggeringPolicy />
</Policies>
+ <DefaultRolloverStrategy max="30">
+ <Delete basePath="${logsDirectory}" maxDepth="2">
+ <IfFileName glob="*/*.log">
+ <IfLastModified age="P30D"/>
+ </IfFileName>
+ </Delete>
+ </DefaultRolloverStrategy>
</RollingRandomAccessFile>
<RollingRandomAccessFile name="auditlog" fileName="${logsDirectory}/archiva-audit.log"
@@ -47,6 +54,13 @@
<Policies>
<TimeBasedTriggeringPolicy />
</Policies>
+ <DefaultRolloverStrategy max="30">
+ <Delete basePath="${logsDirectory}" maxDepth="2">
+ <IfFileName glob="*/*.log">
+ <IfLastModified age="P30D"/>
+ </IfFileName>
+ </Delete>
+ </DefaultRolloverStrategy>
</RollingRandomAccessFile>
</appenders>