This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch release18.12 in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
commit 2f4d1acdb93c274eb94ead7890b64dd383cb3dad Author: Jacques Le Roux <jacques.le.r...@les7arts.com> AuthorDate: Sun Apr 28 08:48:20 2024 +0200 Improved: Use new Tomcat 9 maxDays Access_Log_Valve Attribute (OFBIZ-13073) https://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Access_Log_Valve Conflict handled by hand framework/catalina/ofbiz-component.xml --- framework/catalina/ofbiz-component.xml | 2 ++ .../java/org/apache/ofbiz/catalina/container/CatalinaContainer.java | 1 + 2 files changed, 3 insertions(+) diff --git a/framework/catalina/ofbiz-component.xml b/framework/catalina/ofbiz-component.xml index 85dc5ccf78..cc3c42fc43 100644 --- a/framework/catalina/ofbiz-component.xml +++ b/framework/catalina/ofbiz-component.xml @@ -43,6 +43,7 @@ under the License. <property name="access-log-rotate" value="true"/> <property name="access-log-prefix" value="access_log."/> <property name="access-log-dir" value="runtime/logs"/> + <property name="access-log-maxDays" value="30"/> <!-- uncomment for cluster support <property name="default-server-cluster" value="cluster"> <property name="rep-valve-filter"> @@ -184,6 +185,7 @@ under the License. <property name="access-log-rotate" value="true"/> <property name="access-log-prefix" value="access_log."/> <property name="access-log-dir" value="runtime/logs"/> + <property name="access-log-maxDays" value="30"/> <property name="enable-request-dump" value="false"/> </property> <property name="ajp-connector" value="connector"> diff --git a/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java b/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java index 538bca472d..df92fed438 100644 --- a/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java +++ b/framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java @@ -394,6 +394,7 @@ public class CatalinaContainer implements Container { accessLogValve.setPrefix(accessLogPrefix); } accessLogValve.setRotatable(ContainerConfig.getPropertyValue(engineConfig, "access-log-rotate", false)); + accessLogValve.setMaxDays(Integer.valueOf(ContainerConfig.getPropertyValue(engineConfig, "access-log-maxDays", null))); engineValves.add(accessLogValve); }