소스 검색

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>
pull/73/head
Olivier Lamy 2 년 전
부모
커밋
eb489a1dee
2개의 변경된 파일15개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      Jenkinsfile
  2. 14
    0
      archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j2.xml

+ 1
- 1
Jenkinsfile 파일 보기

@@ -106,7 +106,7 @@ pipeline {
// -Dmaven.compiler.fork=true: Do compile in a separate forked process
// -Dmaven.test.failure.ignore=true: Do not stop, if some tests fail
// -Pci-build: Profile for CI-Server
sh "mvn ${cmdLine} -B -U -e -fae -Dorg.slf4j.simpleLogger.showThreadName=true -Dmaven.compiler.fork=true -Pci-build -T${THREADS}"
sh "mvn ${cmdLine} -B -U -e -fae -Dorg.slf4j.simpleLogger.showThreadName=true -Pci-build -T${THREADS}"
}
}
}

+ 14
- 0
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"

Loading…
취소
저장