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

when@dev:
    monolog:
        handlers:
            main:
                type: stream
                path: "%kernel.logs_dir%/%kernel.environment%.log"
                level: debug
                channels: ["!event"]
            # 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"]

when@test:
    monolog:
        handlers:
            main:
                type: fingers_crossed
                action_level: error
                handler: grouped
                excluded_http_codes: [404, 405]
                buffer_size: 50 # How many messages should be saved? Prevent memory leaks
                channels: ["!console"]
            grouped:
                type:    group
                members: [streamed, deduplicated]
            streamed:
                type:  rotating_file
                max_files: 30
                path:  '%kernel.logs_dir%/%kernel.environment%.log'
                level: debug
            deduplicated:
                type:    deduplication
                time: 10             # the time in seconds during which duplicate entries are discarded (default: 60)
                handler: symfony_mailer
            symfony_mailer:
                type:         symfony_mailer
                from_email:   '%env(MAILER_FROM)%'
                to_email:     ['fleutotp@gmail.com']
                subject:      'Bug Evalulu %kernel.environment% : %%message%%'
                level:        critical
                formatter:    monolog.formatter.extra_data
                content_type: text/html
            security:
                # log all messages (since debug is the lowest level)
                level:    info
                type:     stream
                path:     '%kernel.logs_dir%/security%kernel.environment%.log'
                channels: [security]

when@prod:
    monolog:
        handlers:
            main:
                type: fingers_crossed
                action_level: error
                handler: grouped
                excluded_http_codes: [404, 405]
                buffer_size: 50 # How many messages should be saved? Prevent memory leaks
                channels: ["!console"]
            grouped:
                type:    group
                members: [streamed, deduplicated]
            streamed:
                type:  rotating_file
                max_files: 30
                path:  '%kernel.logs_dir%/%kernel.environment%.log'
                level: debug
            deduplicated:
                type:    deduplication
                time: 10             # the time in seconds during which duplicate entries are discarded (default: 60)
                handler: symfony_mailer
            symfony_mailer:
                type:         symfony_mailer
                from_email:   '%env(MAILER_FROM)%'
                to_email:     ['fleutotp@gmail.com']
                subject:      'Bug Evalulu %kernel.environment% : %%message%%'
                level:        critical
                formatter:    monolog.formatter.extra_data
                content_type: text/html
            security:
                # log all messages (since debug is the lowest level)
                level:    info
                type:     stream
                path:     '%kernel.logs_dir%/security.log'
                channels: [security]

