diff options
author | Olivier Lamy <olamy@apache.org> | 2022-04-11 07:53:28 +1000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2022-04-11 07:56:10 +1000 |
commit | eb489a1deedf3366325922b29473c8b2302f9fce (patch) | |
tree | 843ec2e644b1da272d7898de3105aeb7debdfefd /archiva-modules/archiva-web/archiva-webapp | |
parent | 0b270de6c0a1b1115235a03c4a27a17e55242190 (diff) | |
download | archiva-eb489a1deedf3366325922b29473c8b2302f9fce.tar.gz archiva-eb489a1deedf3366325922b29473c8b2302f9fce.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/archiva-web/archiva-webapp')
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j2.xml | 14 |
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 7f12f2f6c..6d18560b2 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> <RollingRandomAccessFile name="redbackAuditLog" fileName="${logsDirectory}/archiva-security-audit.log" |