<?xml version="1.0" encoding="UTF-8" ?>

<xsd:schema xmlns="http://symfony.com/schema/dic/monolog"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://symfony.com/schema/dic/monolog"
    elementFormDefault="qualified">

    <xsd:element name="config" type="config" />

    <xsd:complexType name="config">
        <xsd:choice minOccurs="0" maxOccurs="unbounded">
            <xsd:element name="handler" type="handler" />
        </xsd:choice>
    </xsd:complexType>

    <xsd:complexType name="handler">
        <xsd:sequence>
            <xsd:element name="email-prototype" type="email-prototype" minOccurs="0" maxOccurs="1" />
            <xsd:element name="member" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
            <xsd:element name="channels" type="channels" minOccurs="0" maxOccurs="1" />
            <xsd:element name="publisher" type="publisher" minOccurs="0" maxOccurs="1" />
        </xsd:sequence>
        <xsd:attribute name="type" type="xsd:string" />
        <xsd:attribute name="priority" type="xsd:integer" />
        <xsd:attribute name="level" type="level" />
        <xsd:attribute name="bubble" type="xsd:boolean" />
        <xsd:attribute name="path" type="xsd:string" />
        <xsd:attribute name="id" type="xsd:string" />
        <xsd:attribute name="name" type="xsd:string" use="required" />
        <xsd:attribute name="ident" type="xsd:string" />
        <xsd:attribute name="facility" type="xsd:string" />
        <xsd:attribute name="action-level" type="level" />
        <xsd:attribute name="buffer-size" type="xsd:integer" />
        <xsd:attribute name="max-files" type="xsd:integer" />
        <xsd:attribute name="handler" type="xsd:string" />
        <xsd:attribute name="from-email" type="xsd:string" />
        <xsd:attribute name="to-email" type="xsd:string" />
        <xsd:attribute name="subject" type="xsd:string" />
        <xsd:attribute name="formatter" type="xsd:string" />
    </xsd:complexType>

    <xsd:simpleType name="level">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="debug" />
            <xsd:enumeration value="info" />
            <xsd:enumeration value="warning" />
            <xsd:enumeration value="error" />
            <xsd:enumeration value="critical" />
            <xsd:enumeration value="alert" />

            <xsd:enumeration value="DEBUG" />
            <xsd:enumeration value="INFO" />
            <xsd:enumeration value="WARNING" />
            <xsd:enumeration value="ERROR" />
            <xsd:enumeration value="CRITICAL" />
            <xsd:enumeration value="ALERT" />

            <xsd:enumeration value="100" />
            <xsd:enumeration value="200" />
            <xsd:enumeration value="300" />
            <xsd:enumeration value="400" />
            <xsd:enumeration value="500" />
            <xsd:enumeration value="550" />
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:complexType name="publisher">
        <xsd:attribute name="id" type="xsd:string" />
        <xsd:attribute name="hostname" type="xsd:string" />
        <xsd:attribute name="port" type="xsd:integer" />
        <xsd:attribute name="chunk_size" type="xsd:integer" />
    </xsd:complexType>

    <xsd:complexType name="email-prototype">
        <xsd:attribute name="id" type="xsd:string" />
        <xsd:attribute name="method" type="xsd:string" />
    </xsd:complexType>

    <xsd:complexType name="channels">
        <xsd:sequence>
            <xsd:element name="channel" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
        <xsd:attribute name="type" type="xsd:string" />
    </xsd:complexType>

    <xsd:simpleType name="channel_type">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="inclusive" />
            <xsd:enumeration value="exclusive" />
        </xsd:restriction>
    </xsd:simpleType>
</xsd:schema>
