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