From 38a3d4489723e4fc27d72498bebfe94b9d6e474c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 23 Jan 2026 08:56:47 +0100 Subject: [PATCH] Update monolog configuration to use dynamic log prefix and add error log handler Revised `monolog.yaml` to replace static `log_prefix` with `chill_environment` variable and added a new `errors_log` handler. Expanded exclusion channels in default handler to include `deprecation`. --- templates/config/prod/monolog.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/templates/config/prod/monolog.yaml b/templates/config/prod/monolog.yaml index 957d1f4..75b0de5 100644 --- a/templates/config/prod/monolog.yaml +++ b/templates/config/prod/monolog.yaml @@ -6,7 +6,7 @@ # parameters: - log_prefix: 'test' + log_prefix: '{{ chill.chill_environment }}' monolog: # make a "notifier" channel available channels: ['notifier'] @@ -16,6 +16,10 @@ monolog: path: "%kernel.logs_dir%/notifier-%log_prefix%.log" level: info channels: [ 'notifier' ] + errors_log: + type: stream + path: "%kernel.logs_dir%/error-%log_prefix%.log" + level: error privacy_log: type: stream path: "%kernel.logs_dir%/privacy-%log_prefix%.log" @@ -25,7 +29,7 @@ monolog: type: stream path: "%kernel.logs_dir%/default-%log_prefix%.log" level: info - channels: [ '!event', '!doctrine', '!console', '!chill',] + channels: [ '!event', '!doctrine', '!console', '!chill', '!deprecation'] console: type: console process_psr_3_messages: false