MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: /home/cafsindia/lead_cafsinfotech_in/config/packages/monolog.yaml
monolog:
  channels: [ 'upgrade', 'install', 'auth', 'deprecation', 'security' ]
  handlers:
    upgrade:
      type: stream
      path: "%env(default:base.log.dir:env.base_logs:LOG_DIR)%/upgrade.log"
      level: debug
      channels: [ "upgrade" ]
    install:
      type: stream
      path: "%env(default:base.log.dir:env.base_logs:LOG_DIR)%/install.log"
      level: debug
      channels: [ "install" ]
    auth:
      type: stream
      path: "%env(default:log.dir:env.logs:LOG_DIR)%/auth.log"
      level: debug
      channels: [ "auth" ]
    main:
      type: stream
      path: "%env(default:log.dir:env.logs:LOG_DIR)%/%env(default:log.main.default:MAIN_LOG_FILE_NAME)%"
      level: '%env(MAIN_LOG_LEVEL)%'
      channels: [ "!event", "!upgrade" ]
      # uncomment to get logging in your browser
      # you may have to allow bigger header sizes in your Web server configuration
      #firephp:
      #    type: firephp
      #    level: info
      #chromephp:
      #    type: chromephp
      #    level: info
    console:
      type: console
      process_psr_3_messages: false
      channels: [ "!event", "!doctrine", "!console", "!upgrade" ]

    deprecation:
      type: stream
      path: "%env(default:log.dir:env.logs:LOG_DIR)%/%env(default:log.deprecation.default:DEPRECATION_LOG_FILE_NAME)%"
      level: '%env(DEPRECATION_LOG_LEVEL)%'
      max_level: error
      channels: [ "deprecation" ]

    security:
      type: stream
      path: "%env(default:log.dir:env.logs:LOG_DIR)%/%env(default:log.security.default:SECURITY_LOG_FILE_NAME)%"
      level: '%env(SECURITY_LOG_LEVEL)%'
      max_level: error
      channels: [ "security" ]

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:
      main:
        type: fingers_crossed
        action_level: info
        handler: nested
        excluded_http_codes: [404, 405]
        # Prevents memory leaks
        buffer_size:  50
        channels: ["!event","!upgrade", "!deprecation" , "!security"]
      nested:
        type: stream
        path: "%env(default:log.dir:env.logs:LOG_DIR)%/%env(default:log.main.default:MAIN_LOG_FILE_NAME)%"
        level: '%env(MAIN_LOG_LEVEL)%'
        channels: ["!event", "!upgrade", "!deprecation" , "!security"]
      console:
        type: console
        process_psr_3_messages: false
        level: warning
        action_level: info
        channels: ["!event", "!doctrine", "!upgrade", "!deprecation"]

      deprecation:
        type: stream
        path: "%env(default:log.dir:env.logs:LOG_DIR)%/%env(default:log.deprecation.default:DEPRECATION_LOG_FILE_NAME)%"
        level: '%env(DEPRECATION_LOG_LEVEL)%'
        max_level: error
        channels: [ "deprecation" ]

      security:
        type: stream
        path: "%env(default:log.dir:env.logs:LOG_DIR)%/%env(default:log.security.default:SECURITY_LOG_FILE_NAME)%"
        level: '%env(SECURITY_LOG_LEVEL)%'
        max_level: error
        channels: [ "security" ]