monolog:
  channels:
    - deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists

when@dev:
  monolog:
    handlers:
      xlite:
        type: service
        id: XCart\Monolog\Handler\XCFileHandler
        channels: ["!event", "!doctrine"]
      cloudwatch:
        type: service
        id: XCart\Monolog\Handler\CloudWatch
        channels: ["!event", "!doctrine"]
      console:
        type: console
        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:
      xlite:
        type: service
        id: XCart\Monolog\Handler\XCFileHandler
        channels: ["!event", "!doctrine"]
      cloudwatch:
        type: service
        id: XCart\Monolog\Handler\CloudWatch
        channels: ["!event", "!doctrine"]
