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