<!--
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
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 我工程里配的log4j.xml文件,但是由于想动态改变日志级别,所以引了logback-classic包,结果一直...
- logback日志必备。平时在新建项目的时候都是Ctrl+C和Ctrl+V,完全不要自己做什么,不管使用Sprin...
- 第二章:logback架构 [TOC] 官方英文文档地址 logback架构 logback被设计的...
- LoggerFactory is not a Logback LoggerContext but Logback ...
- 本文copy于点我 一、logback的介绍 Logback是由log4j创始人设计的另一个开源日志组件,官方网站...