update error handling monolog.yaml

This commit is contained in:
Charles 2025-12-01 15:52:07 +01:00
parent fe0432cef1
commit cb34a18948
1 changed files with 9 additions and 1 deletions

View File

@ -8,6 +8,7 @@ monolog:
- admin_actions
- security
- php
- error
- deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists
when@dev:
@ -48,7 +49,7 @@ when@test:
when@prod:
monolog:
handlers:
error:
critical_error:
type: fingers_crossed
action_level: critical
handler: error_nested
@ -60,6 +61,13 @@ when@prod:
level: debug
max_files: 30
error:
type: rotating_file
path: "%kernel.logs_dir%/error.log"
level: error # logs error, critical, alert, emergency
max_files: 30
channels: [ error ]
php_errors:
type: rotating_file
path: "%kernel.logs_dir%/php_error.log"