From c72da53e55317605da1812246dc6becdd2c35f28 Mon Sep 17 00:00:00 2001 From: cailbourdin Date: Tue, 19 Nov 2024 10:58:33 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20pas=20de=20r=C3=A9tention=20des=20logs?= =?UTF-8?q?=20tomcat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- etc/tomcat/conf/logging.properties | 59 +++++++++++++++++++ .../externalid/src/main/resources/logback.xml | 2 +- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 etc/tomcat/conf/logging.properties diff --git a/etc/tomcat/conf/logging.properties b/etc/tomcat/conf/logging.properties new file mode 100644 index 0000000..7d6e102 --- /dev/null +++ b/etc/tomcat/conf/logging.properties @@ -0,0 +1,59 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler +.handlers = 1catalina.org.apache.juli.AsyncFileHandler + +############################################################ +# Handler specific properties. +# Describes specific configuration info for Handlers. +############################################################ + +1catalina.org.apache.juli.AsyncFileHandler.level = ALL +1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina. +1catalina.org.apache.juli.AsyncFileHandler.encoding = UTF-8 + +2localhost.org.apache.juli.AsyncFileHandler.level = ALL +2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost. +2localhost.org.apache.juli.AsyncFileHandler.encoding = UTF-8 + +3manager.org.apache.juli.AsyncFileHandler.level = ALL +3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +3manager.org.apache.juli.AsyncFileHandler.prefix = manager. +3manager.org.apache.juli.AsyncFileHandler.encoding = UTF-8 + +4host-manager.org.apache.juli.AsyncFileHandler.level = ALL +4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +4host-manager.org.apache.juli.AsyncFileHandler.prefix = host-manager. +4host-manager.org.apache.juli.AsyncFileHandler.encoding = UTF-8 + +############################################################ +# Facility specific properties. +# Provides extra control for each logger. +############################################################ + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = WARNING +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.AsyncFileHandler + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.AsyncFileHandler + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.AsyncFileHandler + +org.apache.catalina.startup.Catalina.level=INFO +org.apache.catalina.core.StandardService.level=INFO \ No newline at end of file diff --git a/overlays/externalid/src/main/resources/logback.xml b/overlays/externalid/src/main/resources/logback.xml index 9f95490..eac792f 100644 --- a/overlays/externalid/src/main/resources/logback.xml +++ b/overlays/externalid/src/main/resources/logback.xml @@ -9,7 +9,7 @@ ${LOG_DIR}/archives/${CONTEXT_NAME}.%d{yyyy-MM-dd}.log.gz - 90 + 365 UTF-8