Open
Description
PHP 8.2
Symfony 7.2.3
Monolog 3.10.0
Hello, I'm using monolog with Symfony.
I configured the "main" log for rotation, but it seems rotation never happens.
Here's the config I put in monolog.yaml to configure the service :
when@dev:
monolog:
handlers:
main:
type: rotating_file
path: "%kernel.logs_dir%/%kernel.environment%_main.log"
level: debug
channels: [ "!security", "!audit" ]
max_files: 30
security:
type: rotating_file
path: "%kernel.logs_dir%/%kernel.environment%_security.log"
level: debug
channels: [ "security" ]
max_files: 10
audit:
type: rotating_file
path: "%kernel.logs_dir%/%kernel.environment%_audit.log"
level: debug
channels: [ "audit" ]
max_files: 10
For security and audit handlers, everything is ok. I've got log files each day, with names like "dev_audit-YYYY-MM-DD.log" or "dev_security-YYYY-MM-DD.log". Same configuration is done for "main" handler, but the logs never rotates. And I saw that the log file is called "dev.log", and not "dev_main.log" as configured.
Do you see anything I missed in the configuration please ?
Thank you.
Michaël