From e50a7e685fcf774ed7d747e56ed43c277170509e Mon Sep 17 00:00:00 2001 From: Jun Jeong Date: Tue, 16 May 2023 16:20:29 +1000 Subject: [PATCH] CLIP-1800: Added maxDays in access log valve --- README.md | 6 ++++++ config/server.xml.j2 | 3 ++- tests/test_image.py | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fe3f319..8031c79 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,12 @@ see https://tomcat.apache.org/tomcat-7.0-doc/config/index.html * `ATL_TOMCAT_URIENCODING` (default: UTF-8) * `ATL_TOMCAT_MAXHTTPHEADERSIZE` (default: 8192) +## Access Log Settings + +You can set the maximum number of days for access logs to be retained before being deleted. The default value of -1 means never delete old files. + +* `ATL_TOMCAT_ACCESS_LOGS_MAXDAYS` (default: -1) + ## JVM configuration If you need to pass additional JVM arguments to Confluence such as specifying a diff --git a/config/server.xml.j2 b/config/server.xml.j2 index 33273f5..86ae2e1 100644 --- a/config/server.xml.j2 +++ b/config/server.xml.j2 @@ -47,7 +47,8 @@ prefix="confluence_access" suffix=".log" rotatable="true" - pattern="%h %{X-AUSERNAME}o %t "%r" %s %b %D %U %I "%{User-Agent}i"" /> + pattern="%h %{X-AUSERNAME}o %t "%r" %s %b %D %U %I "%{User-Agent}i"" + maxDays="{{ atl_tomcat_access_logs_maxdays | default('-1') }}"/>