imports:
    - { resource: config.yml }

#framework:
#    validation:
#        cache: apc

#doctrine:
#    orm:
#        metadata_cache_driver: apc
#        result_cache_driver: apc
#        query_cache_driver: apc

monolog:
    handlers:
        # Main logger
        main:
            type:         fingers_crossed
            action_level: critical
            handler:      grouped
        grouped:
            type:    group
            members: [streamed, buffered]
        streamed:
            type:  stream
            path:  "%kernel.logs_dir%/%kernel.environment%.log"
            level: debug
            formatter: monolog.formatter.session_request
        buffered:
            type:    buffer
            handler: swift
            channels: ['!domain', '!ldap', '!security']
        swift:
            type:       swift_mailer
            from_email: "%default_from%"
            to_email: "%log_email%"
            subject: "%log_prefix% An error occured!"
            level:      debug
            formatter: monolog.formatter.session_request

        # Domain logger
        domain_buffer:
            type: buffer
            handler: domain_mail
            channels: domain
            level: info
        domain_mail:
            type: swift_mailer
            from_email: "%default_from%"
            to_email: "%log_email%"
            subject: "%log_prefix% Domain operation"
            channels: domain
            formatter: monolog.formatter.session_request

        # Ldap/Sec logger
        ldap_buffer:
            type: buffer
            handler: ldapsecmail_buffer
            channels: ldap
            level: info
        security_buffer:
            type: buffer
            handler: ldapsecmail_buffer
            channels: security
            level: warning
            
        ldapsecmail_buffer:
            type: buffer
            handler: ldapsecmail

        ldapsecmail:
            type: swift_mailer
            from_email: "%default_from%"
            to_email: "%log_email%"
            subject: "%log_prefix% SECURITY"
            formatter: monolog.formatter.session_request

        # Database
        db:
            type: service
            id: tvn7.monolog.db_handler
            
        # console logger
        #console:
        #    type:  console

assetic:
    node: /usr/bin/nodejs
    filters:
        uglifyjs2:
            bin: "%kernel.root_dir%/Resources/node_modules/uglify-js/bin/uglifyjs"
            #apply_to: "\.js$"
        uglifycss:
            bin: "%kernel.root_dir%/Resources/node_modules/uglifycss/uglifycss"
            #apply_to: "\.css$"

swiftmailer:
    mailers:
        default:
            disable_delivery: "%disable_email_delivery%"
        spool5m:
            disable_delivery: "%disable_email_delivery%"
        spool1m:
            disable_delivery: "%disable_email_delivery%"

