monolog:
    channels: ['main', 'main_critical','cron']
    handlers:
        cron:
            type: rotating_file
            max_files: 10
            path: "%kernel.logs_dir%/cron-%kernel.environment%.log"
            level: debug
            channels: ["cron"]
        cron_mail:
            type: fingers_crossed
            action_level: info
            handler: cron_mail_swift
            channels: ["cron"]
            activation_strategy: App\Monolog\CronLogMailActivationStrategy
        cron_mail_swift:
            type: swift_mailer
            from_email: "%env(EMAIL_ERROR_FROM)%"
            to_email: "%env(EMAIL_ERROR)%"
            subject: '[Kohinos] Journal cron %%datetime%%'
            level: debug
            formatter: monolog.formatter.html
            content_type: text/html
        main:
            type: fingers_crossed
            action_level: error
            handler: nested
            excluded_404s:
                # regex: exclude all 404 errors from the logs
                - ^/
            channels: ["!cron"]
        nested:
            type: rotating_file
            max_files: 10
            path: "%kernel.logs_dir%/%kernel.environment%.log"
            level: debug
        console:
            type: console
            process_psr_3_messages: false
            channels: ["!event", "!doctrine", "!cron"]
        # deprecation:
        #     type: stream
        #     path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log"
        # deprecation_filter:
        #     type: filter
        #     handler: deprecation
        #     max_level: info
        #     channels: ["php"]
        main_critical:
            type:           fingers_crossed
            action_level:   critical
            handler:        grouped_critical
            channels:       ["!event", "!cron"]
        grouped_critical:
            type:           group
            members:        [streamed_critical, swift_critical]
        streamed_critical:
            type:           rotating_file
            max_files:      10
            path:           "%kernel.logs_dir%/%kernel.environment%.critical.log"
            level:          critical
        swift_critical:
            type:           swift_mailer
            from_email:     "%env(EMAIL_ERROR_FROM)%"
            to_email:       "%env(EMAIL_ERROR)%"
            subject:        '[Kohinos] Critical Error Occurred! %%message%%'
            level:          critical
            formatter:      monolog.formatter.html
            content_type:   text/html   
