monolog:
    channels: [deprecation, cron]

when@dev:
    monolog:
        handlers:
            cron:
                type: stream
                path: "%kernel.logs_dir%/cron.log"
                level: info
                channels: [cron]
            main:
                type: stream
                path: "%kernel.logs_dir%/%kernel.environment%.log"
                level: debug
                channels: ["!event", "!cron"]
            console:
                type: console
                process_psr_3_messages: false
                channels: ["!event", "!doctrine", "!console"]

when@prod:
    monolog:
        handlers:
            cron:
                type: stream
                path: "%kernel.logs_dir%/cron.log"
                level: info
                channels: [cron]
            main:
                type: stream
                path: "%kernel.logs_dir%/%kernel.environment%.log"
                level: debug
                channels: ["!deprecation", "!cron"]
            deprecation:
                type: stream
                channels: [deprecation]
                path: "%kernel.logs_dir%/deprecations.log"
            # Remonte les logs ERROR+ vers GlitchTip en tant qu'Issues (service défini
            # dans sentry.yaml). Envoi immédiat, indépendamment des handlers fichier.
            sentry:
                type: service
                id: Sentry\Monolog\Handler
                channels: ["!event", "!doctrine", "!deprecation", "!cron"]
