From b19b9a50c45749905e5311efb13c8214cea124c0 Mon Sep 17 00:00:00 2001 From: afornerot Date: Mon, 19 Oct 2020 10:44:33 +0200 Subject: [PATCH] =?UTF-8?q?mise=20=C3=A0=20niveau=20log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logrotate/ninestat | 13 ++++++++++--- src/ninestat-1.0/app/config/config.yml | 8 -------- src/ninestat-1.0/scripts/ninestat-postservice-01.sh | 3 +++ 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/logrotate/ninestat b/logrotate/ninestat index c5acf09..444c466 100644 --- a/logrotate/ninestat +++ b/logrotate/ninestat @@ -1,6 +1,13 @@ /var/www/html/ninestat/var/logs/*.log { - rotate 5 - daily - su www-data + su root www-data + daily + rotate 7 + size 900 + maxage 7 + compress + dateext + dateformat -%Y%m%d + missingok + create 644 www-data www-data } diff --git a/src/ninestat-1.0/app/config/config.yml b/src/ninestat-1.0/app/config/config.yml index b131685..2cef673 100644 --- a/src/ninestat-1.0/app/config/config.yml +++ b/src/ninestat-1.0/app/config/config.yml @@ -11,14 +11,6 @@ imports: parameters: locale: fr -monolog: - handlers: - main: - type: rotating_file - path: '%kernel.logs_dir%/%kernel.environment%.log' - level: debug - max_files: 10 - framework: #esi: ~ #translator: { fallbacks: ['%locale%'] } diff --git a/src/ninestat-1.0/scripts/ninestat-postservice-01.sh b/src/ninestat-1.0/scripts/ninestat-postservice-01.sh index 27adf3f..7f843a3 100755 --- a/src/ninestat-1.0/scripts/ninestat-postservice-01.sh +++ b/src/ninestat-1.0/scripts/ninestat-postservice-01.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Suppression des logs trop ancien +find var/logs -mindepth 1 -mtime +7 -delete + # Installation des dépendances composer composer install