<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:monolog="http://symfony.com/schema/dic/monolog"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
                        http://symfony.com/schema/dic/monolog http://symfony.com/schema/dic/monolog/monolog-1.0.xsd">

    <services>
        <service id="security_logger" class="Foo">
            <tag name="monolog.logger" channel="security" />
        </service>

        <service id="doctrine_logger" class="Foo">
            <tag name="monolog.logger" channel="doctrine" />
        </service>

        <service id="foo_logger" class="Foo">
            <tag name="monolog.logger" channel="foo" />
        </service>

        <service id="bar_logger" class="Foo">
            <tag name="monolog.logger" channel="bar" />
        </service>
    </services>

    <monolog:config>
        <monolog:handler name="custom" type="stream" path="/tmp/symfony.log" bubble="false" level="ERROR">
            <monolog:channels>
                <monolog:channel>foo</monolog:channel>
            </monolog:channels>
        </monolog:handler>
        <monolog:handler name="main" type="group" handler="nested">
            <monolog:member>nested</monolog:member>
            <monolog:channels>
                <monolog:channel>!foo</monolog:channel>
                <monolog:channel>!bar</monolog:channel>
            </monolog:channels>
        </monolog:handler>
        <monolog:handler name="nested" type="stream" />
        <monolog:handler name="extra" type="syslog" ident="monolog" facility="user" level="ALERT" />
        <monolog:handler name="more" type="native_mailer" to-email="monitoring@example.org" from-email="webmaster@example.org" subject="Monolog report" level="CRITICAL">
            <monolog:channels type="inclusive">
                <monolog:channel>security</monolog:channel>
                <monolog:channel>doctrine</monolog:channel>
            </monolog:channels>
        </monolog:handler>
    </monolog:config>
</container>
