From c572d68eb484a983784201db2eb19fba35a7dfc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 13 Jan 2025 10:52:15 +0100 Subject: [PATCH] Fix logging paths and permissions for chill role configuration Corrected log file paths in Monolog configuration and Compose file for consistency. Updated directory permissions in tasks to allow group write access. These changes improve log file organization and facilitate better collaboration. --- tasks/main.yml | 2 +- templates/compose.yaml | 2 +- templates/config/prod/monolog.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 3199474..7c348a7 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -35,7 +35,7 @@ state: directory owner: 33 group: 33 - mode: '0744' + mode: '0774' - name: Install traefik ansible.builtin.include_tasks: traefik.yml diff --git a/templates/compose.yaml b/templates/compose.yaml index 18e2ca6..4388da2 100644 --- a/templates/compose.yaml +++ b/templates/compose.yaml @@ -29,7 +29,7 @@ services: - env_file.env volumes: - './config/prod:/var/www/app/config/packages/prod:ro' - - '/var/log/chill:/var/www/app/var/logs:rw' + - '/var/log/chill:/var/www/app/var/log:rw' - '{{ doc_storage_dir }}/{{ item['chill_environment'] }}:/var/storage:rw' links: - redis diff --git a/templates/config/prod/monolog.yaml b/templates/config/prod/monolog.yaml index 916479b..f669738 100644 --- a/templates/config/prod/monolog.yaml +++ b/templates/config/prod/monolog.yaml @@ -4,12 +4,12 @@ monolog: handlers: default_log: type: stream - path: "%kernel.logs_dir%/%log_prefix%-privacy.log" + path: "%kernel.logs_dir%/privacy-%log_prefix%.log" level: info channels: ['chill'] chill_log: type: stream - path: "%kernel.logs_dir%/%log_prefix%-default.log" + path: "%kernel.logs_dir%/default-%log_prefix%.log" level: info channels: ['!event', '!doctrine', '!console', '!chill'] console: