monolog:
    channels:
        - deprecation
        # Kein Kanal „app“: Symfony nutzt ihn als Standard; eigener Kanal für LoggingService:
        - terraflow

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

when@test:
    monolog:
        handlers:
            main:
                type: fingers_crossed
                action_level: error
                handler: nested
                excluded_http_codes: [404, 405]
                channels: ["!event"]
            nested:
                type: stream
                path: "%kernel.logs_dir%/%kernel.environment%.log"
                level: debug

when@prod:
    monolog:
        handlers:
            # Direkt ab INFO (kein fingers_crossed), damit normale Betriebs-Logs zuverlässig landen
            main:
                type: rotating_file
                path: "%kernel.logs_dir%/prod.log"
                level: info
                max_files: 14
                channels: ["!event", "!deprecation"]
            console:
                type: console
                level: warning
                process_psr_3_messages: false
                channels: ["!event", "!doctrine"]
            deprecation:
                type: stream
                channels: [deprecation]
                path: "%kernel.logs_dir%/deprecation.log"
                level: notice
