美文网首页
logback.xsd

logback.xsd

作者: itshajia | 来源:发表于2021-10-12 21:35 被阅读0次
    <!--
    https://github.com/enricopulatzo/logback-XSD/blob/master/src/main/xsd/logback.xsd
    -->
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
        <xsd:element name="configuration" type="Configuration"/>
        <xsd:element name="included" type="Configuration"/>
    
        <xsd:complexType name="Configuration">
            <xsd:choice maxOccurs="unbounded">
                <xsd:element name="shutdownHook" minOccurs="0" maxOccurs="1" type="ShutdownHook"/>
                <xsd:element name="statusListener" minOccurs="0" maxOccurs="unbounded" type="StatusListener"/>
                <xsd:element name="jmxConfigurator" minOccurs="0" maxOccurs="1" type="JmxConfigurator"/>
                <xsd:element name="contextListener" minOccurs="0" maxOccurs="unbounded" type="ContextListener"/>
                <xsd:element name="conversionRule" minOccurs="0" maxOccurs="unbounded" type="ConversionRule"/>
                <xsd:element name="include" minOccurs="0" maxOccurs="unbounded" type="Include"/>
                <xsd:element name="contextName" minOccurs="0" maxOccurs="1" type="xsd:string"/>
                <xsd:element name="define" minOccurs="0" maxOccurs="unbounded" type="Define"/>
                <xsd:element name="timestamp" minOccurs="0" maxOccurs="1" type="Timestamp"/>
                <xsd:element name="if" minOccurs="0" maxOccurs="unbounded" type="If"/>
                <xsd:element name="property" minOccurs="0" maxOccurs="unbounded" type="Property"/>
                <xsd:element name="appender" minOccurs="0" maxOccurs="unbounded" type="Appender"/>
                <xsd:element name="logger" minOccurs="0" maxOccurs="unbounded" type="Logger"/>
                <xsd:element name="root" minOccurs="0" maxOccurs="1" type="Root"/>
                <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:choice>
            <xsd:attribute name="debug" type="xsd:boolean" use="optional"/>
            <xsd:attribute name="scan" type="xsd:string" use="optional"/>
            <xsd:attribute name="scanPeriod" type="xsd:string" use="optional"/>
            <xsd:anyAttribute/>
        </xsd:complexType>
    
        <xsd:complexType name="ShutdownHook">
            <xsd:attribute name="class" type="xsd:string" use="optional"
                           default="ch.qos.logback.core.hook.DelayingShutdownHook"/>
            <xsd:anyAttribute/>
        </xsd:complexType>
    
        <xsd:complexType name="StatusListener">
            <xsd:attribute name="class" type="xsd:string" use="optional"/>
            <xsd:anyAttribute/>
        </xsd:complexType>
    
        <xsd:complexType name="ContextListener">
            <xsd:choice maxOccurs="unbounded">
                <xsd:element name="resetJUL" type="xsd:boolean"/>
                <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:choice>
            <xsd:attribute name="class" type="xsd:string"/>
            <xsd:anyAttribute/>
        </xsd:complexType>
    
        <xsd:complexType name="ConversionRule">
            <xsd:attribute name="conversionWord" type="xsd:string"/>
            <xsd:attribute name="converterClass" type="xsd:string"/>
        </xsd:complexType>
    
        <xsd:complexType name="Include">
            <xsd:attribute name="optional" use="optional" type="xsd:boolean"/>
            <xsd:attribute name="file" use="optional" type="xsd:string"/>
            <xsd:attribute name="resource" use="optional" type="xsd:string"/>
            <xsd:attribute name="url" use="optional" type="xsd:string"/>
        </xsd:complexType>
    
        <xsd:complexType name="Define">
            <xsd:sequence>
                <xsd:any minOccurs="0" maxOccurs="unbounded"/>
            </xsd:sequence>
            <xsd:anyAttribute/>
        </xsd:complexType>
    
        <xsd:complexType name="Timestamp">
            <xsd:sequence>
                <xsd:any minOccurs="0" maxOccurs="unbounded"/>
            </xsd:sequence>
            <xsd:attribute name="key" type="xsd:string" use="optional"/>
            <xsd:attribute name="datePattern" type="xsd:string" use="optional"/>
            <xsd:attribute name="timeReference" type="xsd:string" use="optional"/>
            <xsd:anyAttribute/>
        </xsd:complexType>
    
        <xsd:complexType name="RollingPolicy">
            <xsd:choice maxOccurs="unbounded">
                <xsd:element name="fileNamePattern" minOccurs="1" maxOccurs="1" type="xsd:string"/>
                <xsd:element name="maxHistory" minOccurs="0" maxOccurs="1" type="xsd:int"/>
                <xsd:element name="minIndex" minOccurs="0" maxOccurs="1" type="xsd:int"/>
                <xsd:element name="maxIndex" minOccurs="0" maxOccurs="1" type="xsd:int"/>
                <xsd:element name="timeBasedFileNamingAndTriggeringPolicy" minOccurs="0" maxOccurs="1" type="TriggeringPolicy"/>
                <xsd:element name="cleanHistoryOnStart" minOccurs="0" maxOccurs="1" type="xsd:boolean"/>
                <xsd:element name="maxFileSize" minOccurs="0" maxOccurs="1" type="FileSize"/>
                <xsd:element name="totalSizeCap" minOccurs="0" maxOccurs="1" type="FileSize"/>
            </xsd:choice>
            <xsd:attribute name="class" type="xsd:string" use="required"/>
        </xsd:complexType>
    
        <xsd:simpleType name="FileSize">
            <xsd:restriction base="xsd:string">
                <xsd:pattern value="[1-9][0-9]*(KB|MB|GB)?"/>
            </xsd:restriction>
        </xsd:simpleType>
    
        <xsd:complexType name="TriggeringPolicy">
            <xsd:sequence>
                <xsd:element name="maxFileSize" minOccurs="0" maxOccurs="1" type="xsd:string"/>
            </xsd:sequence>
            <xsd:attribute name="class" type="xsd:string" use="required"/>
        </xsd:complexType>
    
        <xsd:complexType name="If">
            <xsd:choice maxOccurs="unbounded">
                <xsd:element type="Configuration" name="then"/>
                <xsd:element type="Configuration" name="else"/>
                <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:choice>
            <xsd:attribute name="condition" type="xsd:string"/>
            <xsd:anyAttribute/>
        </xsd:complexType>
    
        <xsd:complexType name="Property">
            <xsd:sequence>
                <xsd:any minOccurs="0" maxOccurs="unbounded"/>
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:string" use="optional"/>
            <xsd:attribute name="value" type="xsd:string" use="optional"/>
            <xsd:attribute name="file" type="xsd:string" use="optional"/>
            <xsd:attribute name="resource" type="xsd:string" use="optional"/>
            <xsd:anyAttribute/>
        </xsd:complexType>
    
        <xsd:complexType name="Appender">
            <xsd:choice maxOccurs="unbounded">
                <xsd:element name="file" minOccurs="0" maxOccurs="1" type="xsd:string"/>
                <xsd:element name="encoder" minOccurs="0" maxOccurs="1" type="Encoder"/>
                <xsd:element name="filter" minOccurs="0" maxOccurs="1" type="Filter"/>
                <xsd:element name="append" minOccurs="0" maxOccurs="1" type="xsd:boolean"/>
                <xsd:element name="prudent" minOccurs="0" maxOccurs="1" type="xsd:boolean"/>
                <xsd:element name="layout" minOccurs="0" maxOccurs="1" type="Layout"/>
                <xsd:element name="rollingPolicy" minOccurs="0" maxOccurs="1" type="RollingPolicy"/>
                <xsd:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:choice>
            <xsd:attribute name="name" type="xsd:string" use="required"/>
            <xsd:attribute name="class" type="xsd:string" use="required"/>
            <xsd:anyAttribute/>
        </xsd:complexType>
    
        <xsd:complexType name="Filter">
            <xsd:choice maxOccurs="unbounded">
                <xsd:element name="level" minOccurs="0" maxOccurs="unbounded" type="xsd:string"/>
                <xsd:element name="onMatch" minOccurs="0" maxOccurs="unbounded" type="xsd:string"/>
                <xsd:element name="onMismatch" minOccurs="0" maxOccurs="unbounded" type="xsd:string"/>
                <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:choice>
            <xsd:attribute name="class" type="xsd:string" use="optional"/>
            <xsd:anyAttribute/>
        </xsd:complexType>
    
        <xsd:complexType name="Layout">
            <xsd:choice maxOccurs="unbounded">
                <xsd:element name="pattern" minOccurs="0" maxOccurs="1" type="xsd:string"/>
                <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:choice>
            <xsd:attribute name="class" type="xsd:string" use="optional"/>
            <xsd:anyAttribute/>
        </xsd:complexType>
    
        <xsd:complexType name="Logger">
            <xsd:choice maxOccurs="unbounded">
                <xsd:element name="appender-ref" minOccurs="0" maxOccurs="unbounded" type="AppenderRef"/>
                <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:choice>
            <xsd:attribute name="name" type="xsd:string" use="required"/>
            <xsd:attribute name="level" type="LoggerLevels" use="optional"/>
            <xsd:attribute name="additivity" type="xsd:boolean" use="optional"/>
            <xsd:anyAttribute/>
        </xsd:complexType>
    
        <xsd:complexType name="Encoder">
            <xsd:choice maxOccurs="unbounded">
                <xsd:element name="pattern" type="xsd:string" minOccurs="0" maxOccurs="1" />
                <xsd:element name="layout" minOccurs="0" maxOccurs="1" type="Layout" />
                <xsd:element name="immediateFlush" type="xsd:boolean" minOccurs="0" maxOccurs="1" />
                <xsd:element name="outputPatternAsHeader" type="xsd:boolean" minOccurs="0" maxOccurs="1" />
                <xsd:element name="charset" type="xsd:string" minOccurs="0" maxOccurs="1" />
            </xsd:choice>
            <xsd:attribute name="class" type="xsd:string" use="optional"/>
        </xsd:complexType>
    
        <xsd:complexType name="Root">
            <xsd:sequence>
                <xsd:element name="appender-ref" minOccurs="0" maxOccurs="unbounded" type="AppenderRef"/>
            </xsd:sequence>
            <xsd:attribute name="level" use="required" type="LoggerLevels"/>
            <xsd:anyAttribute/>
        </xsd:complexType>
    
        <xsd:complexType name="AppenderRef">
            <xsd:attribute name="ref" type="xsd:string"/>
        </xsd:complexType>
    
        <xsd:simpleType name="LoggerLevels">
            <xsd:union>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:string">
                        <xsd:enumeration value="OFF"/>
                        <xsd:enumeration value="ALL"/>
                        <xsd:enumeration value="INHERITED"/>
                        <xsd:enumeration value="NULL"/>
                        <xsd:enumeration value="ERROR"/>
                        <xsd:enumeration value="WARN"/>
                        <xsd:enumeration value="INFO"/>
                        <xsd:enumeration value="DEBUG"/>
                        <xsd:enumeration value="TRACE"/>
                    </xsd:restriction>
                </xsd:simpleType>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:string">
                        <xsd:pattern value="($\{.+:-)?[Oo][Ff]{2}\}?"/>
                        <xsd:pattern value="($\{.+:-)?[Aa][Ll]{2}\}?"/>
                        <xsd:pattern value="($\{.+:-)?[Ii][Nn][Hh][Ee][Rr][Ii][Tt][Ee][Dd]\}?"/>
                        <xsd:pattern value="($\{.+:-)?[Nn][Uu][Ll]{2}\}?"/>
                        <xsd:pattern value="($\{.+:-)?[Ee][Rr]{2}[Oo][Rr]\}?"/>
                        <xsd:pattern value="($\{.+:-)?[Ww][Aa][Rr][Nn]\}?"/>
                        <xsd:pattern value="($\{.+:-)?[Ii][Nn][Ff][Oo]\}?"/>
                        <xsd:pattern value="($\{.+:-)?[Dd][Ee][Bb][Uu][Gg]\}?"/>
                        <xsd:pattern value="($\{.+:-)?[Tt][Rr][Aa][Cc][Ee]\}?"/>
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:union>
        </xsd:simpleType>
        <xsd:complexType name="JmxConfigurator"/>
    </xsd:schema>
    

    相关文章

      网友评论

          本文标题:logback.xsd

          本文链接:https://www.haomeiwen.com/subject/uupjoltx.html