123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2012, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ This is free software; you can redistribute it and/or modify it
- ~ under the terms of the GNU Lesser General Public License as
- ~ published by the Free Software Foundation; either version 2.1 of
- ~ the License, or (at your option) any later version.
- ~
- ~ This software is distributed in the hope that it will be useful,
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
- ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- ~ Lesser General Public License for more details.
- ~
- ~ You should have received a copy of the GNU Lesser General Public
- ~ License along with this software; if not, write to the Free
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- -->
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- targetNamespace="urn:jboss:domain:logging:1.2"
- xmlns="urn:jboss:domain:logging:1.2"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.2">
- <!-- The logging subsystem root element -->
- <xs:element name="subsystem" type="subsystem"/>
- <xs:complexType name="subsystem">
- <xs:annotation>
- <xs:documentation>
- <![CDATA[
- The configuration of the logging subsystem.
- ]]>
- </xs:documentation>
- </xs:annotation>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="logger" type="loggerType"/>
- <xs:element name="root-logger" type="rootLoggerType"/>
- <xs:element name="console-handler" type="consoleHandlerType"/>
- <xs:element name="file-handler" type="fileHandlerType"/>
- <xs:element name="periodic-rotating-file-handler" type="periodicFileHandlerType"/>
- <xs:element name="size-rotating-file-handler" type="sizeFileHandlerType"/>
- <xs:element name="async-handler" type="asyncHandlerType"/>
- <xs:element name="custom-handler" type="customHandlerType" />
- <xs:element name="syslog-handler" type="syslogHandlerType"/>
- <xs:element name="logging-profiles" type="logging-profilesType" minOccurs="0" maxOccurs="1"/>
- </xs:choice>
- </xs:complexType>
- <xs:complexType name="logging-profilesType">
- <xs:annotation>
- <xs:documentation>
- Contains a list of profiles available for use in deployments
- </xs:documentation>
- </xs:annotation>
- <xs:sequence>
- <xs:element name="logging-profile" type="logging-profileType" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="logging-profileType">
- <xs:annotation>
- <xs:documentation>
- A logging profile that can be used in a deployment for a custom logging configuration.
- </xs:documentation>
- </xs:annotation>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="logger" type="loggerType"/>
- <xs:element name="root-logger" type="rootLoggerType"/>
- <xs:element name="console-handler" type="consoleHandlerType"/>
- <xs:element name="file-handler" type="fileHandlerType"/>
- <xs:element name="periodic-rotating-file-handler" type="periodicFileHandlerType"/>
- <xs:element name="size-rotating-file-handler" type="sizeFileHandlerType"/>
- <xs:element name="async-handler" type="asyncHandlerType"/>
- <xs:element name="custom-handler" type="customHandlerType"/>
- <xs:element name="syslog-handler" type="syslogHandlerType"/>
- </xs:choice>
- <xs:attribute name="name" type="xs:string" use="required"/>
- </xs:complexType>
- <xs:complexType name="propertiesType">
- <xs:annotation>
- <xs:documentation>
- A collection of free-form properties.
- </xs:documentation>
- </xs:annotation>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="property">
- <xs:complexType>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="value" type="xs:string" use="optional"/>
- </xs:complexType>
- </xs:element>
- </xs:choice>
- </xs:complexType>
- <xs:complexType name="refType">
- <xs:annotation>
- <xs:documentation>
- A named reference to another object.
- </xs:documentation>
- </xs:annotation>
- <xs:attribute name="name" type="xs:string" use="required"/>
- </xs:complexType>
- <xs:complexType name="handlersType">
- <xs:annotation>
- <xs:documentation>
- A collection of handlers to apply to the enclosing object.
- </xs:documentation>
- </xs:annotation>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="handler" type="refType"/>
- </xs:choice>
- </xs:complexType>
- <xs:complexType name="rootLoggerType">
- <xs:annotation>
- <xs:documentation>
- Defines the root logger for this log context.
- </xs:documentation>
- </xs:annotation>
- <xs:all minOccurs="1" maxOccurs="1">
- <xs:element name="level" type="refType" minOccurs="0"/>
- <xs:element name="filter-spec" type="valueType" minOccurs="0"/>
- <xs:element name="handlers" type="handlersType" minOccurs="0"/>
- </xs:all>
- </xs:complexType>
- <xs:complexType name="loggerType">
- <xs:annotation>
- <xs:documentation>
- Defines a logger category.
- </xs:documentation>
- </xs:annotation>
- <xs:complexContent>
- <xs:extension base="rootLoggerType">
- <xs:attribute name="use-parent-handlers" type="xs:boolean" use="optional" default="true"/>
- <xs:attribute name="category" type="xs:string" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="consoleHandlerType">
- <xs:annotation>
- <xs:documentation>
- Defines a handler which writes to the console.
- </xs:documentation>
- </xs:annotation>
- <xs:all>
- <xs:element name="level" type="refType" minOccurs="0"/>
- <xs:element name="encoding" type="valueType" minOccurs="0"/>
- <xs:element name="filter-spec" type="valueType" minOccurs="0"/>
- <xs:element name="filter" type="valueType" minOccurs="0"/>
- <xs:element name="formatter" type="formatterType" minOccurs="0"/>
- <xs:element name="target" minOccurs="0">
- <xs:complexType>
- <xs:attribute name="name" use="required">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="System.out"/>
- <xs:enumeration value="System.err"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
- </xs:all>
- <xs:attribute name="autoflush" type="xs:boolean" use="optional" default="true"/>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
- </xs:complexType>
- <xs:complexType name="fileHandlerType">
- <xs:annotation>
- <xs:documentation>
- Defines a handler which writes to a file.
- </xs:documentation>
- </xs:annotation>
- <xs:all>
- <xs:element name="level" type="refType" minOccurs="0"/>
- <xs:element name="encoding" type="valueType" minOccurs="0"/>
- <xs:element name="filter-spec" type="valueType" minOccurs="0"/>
- <xs:element name="formatter" type="formatterType" minOccurs="0"/>
- <xs:element name="file" type="pathType" minOccurs="1"/>
- <xs:element name="append" type="booleanValueType" minOccurs="0"/>
- </xs:all>
- <xs:attribute name="autoflush" type="xs:boolean" use="optional" default="true"/>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
- </xs:complexType>
- <xs:complexType name="periodicFileHandlerType">
- <xs:annotation>
- <xs:documentation>
- Defines a handler which writes to a file, rotating the log after a time period derived from the given
- suffix string, which should be in a format understood by java.text.SimpleDateFormat.
- </xs:documentation>
- </xs:annotation>
- <xs:all>
- <xs:element name="level" type="refType" minOccurs="0"/>
- <xs:element name="encoding" type="valueType" minOccurs="0"/>
- <xs:element name="filter-spec" type="valueType" minOccurs="0"/>
- <xs:element name="formatter" type="formatterType" minOccurs="0"/>
- <xs:element name="file" type="pathType"/>
- <xs:element name="suffix" type="valueType"/>
- <xs:element name="append" type="booleanValueType" minOccurs="0"/>
- </xs:all>
- <xs:attribute name="autoflush" type="xs:boolean" use="optional" default="true"/>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
- </xs:complexType>
- <xs:complexType name="sizeFileHandlerType">
- <xs:annotation>
- <xs:documentation>
- Defines a handler which writes to a file, rotating the log after a the size of the file grows beyond a
- certain point and keeping a fixed number of backups.
- </xs:documentation>
- </xs:annotation>
- <xs:all>
- <xs:element name="level" type="refType" minOccurs="0"/>
- <xs:element name="encoding" type="valueType" minOccurs="0"/>
- <xs:element name="filter-spec" type="valueType" minOccurs="0"/>
- <xs:element name="formatter" type="formatterType" minOccurs="0"/>
- <xs:element name="file" type="pathType"/>
- <xs:element name="rotate-size" type="sizeType" minOccurs="0"/>
- <xs:element name="max-backup-index" type="positiveIntType" minOccurs="0"/>
- <xs:element name="append" type="booleanValueType" minOccurs="0"/>
- </xs:all>
- <xs:attribute name="autoflush" type="xs:boolean" use="optional" default="true"/>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
- </xs:complexType>
- <xs:complexType name="asyncHandlerType">
- <xs:annotation>
- <xs:documentation>
- Defines a handler which writes to the sub-handlers in an asynchronous thread. Used for handlers which
- introduce a substantial amount of lag.
- </xs:documentation>
- </xs:annotation>
- <xs:all>
- <xs:element name="level" type="refType" minOccurs="0"/>
- <xs:element name="filter-spec" type="valueType" minOccurs="0"/>
- <xs:element name="queue-length" type="queueLengthType" minOccurs="1" maxOccurs="1"/>
- <xs:element name="overflow-action" type="overflowActionType" minOccurs="0"/>
- <xs:element name="subhandlers" type="handlersType"/>
- </xs:all>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
- </xs:complexType>
- <xs:complexType name="customHandlerType">
- <xs:annotation>
- <xs:documentation>
- Defines a custom handler.
- </xs:documentation>
- </xs:annotation>
- <xs:all>
- <xs:element name="level" type="refType" minOccurs="0"/>
- <xs:element name="encoding" type="valueType" minOccurs="0"/>
- <xs:element name="filter-spec" type="valueType" minOccurs="0"/>
- <xs:element name="formatter" type="formatterType" minOccurs="0"/>
- <xs:element name="properties" type="propertiesType" minOccurs="0"/>
- </xs:all>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="module" type="xs:string" use="required"/>
- <xs:attribute name="class" type="xs:string" use="required"/>
- <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
- </xs:complexType>
- <xs:complexType name="syslogHandlerType">
- <xs:annotation>
- <xs:documentation>
- Defines a syslog handler for UNIX/Linux based operating systems.
- </xs:documentation>
- </xs:annotation>
- <xs:all>
- <xs:element name="level" type="refType" minOccurs="0"/>
- <xs:element name="server-address" type="valueType" minOccurs="0" maxOccurs="1">
- <xs:annotation>
- <xs:documentation>
- The address of the syslog server. The default is localhost.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="hostname" type="valueType" minOccurs="0" maxOccurs="1">
- <xs:annotation>
- <xs:documentation>
- The name of the host the messages are being sent from. For example the name of the host the
- application server is running on.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="port" type="positiveIntType" minOccurs="0" maxOccurs="1">
- <xs:annotation>
- <xs:documentation>
- The port the syslog server is listening on. The default is 514.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="app-name" type="valueType" minOccurs="0" maxOccurs="1">
- <xs:annotation>
- <xs:documentation>
- The app name used when formatting the message in RFC5424 format. By default the app name is
- "java"
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="formatter" type="syslogFormatterType" minOccurs="0" maxOccurs="1"/>
- <xs:element name="facility" type="facilityType" minOccurs="0" maxOccurs="1"/>
- </xs:all>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
- </xs:complexType>
- <xs:complexType name="queueLengthType">
- <xs:attribute name="value" use="required">
- <xs:simpleType>
- <xs:restriction base="xs:positiveInteger">
- <xs:minExclusive value="1"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- <xs:complexType name="overflowActionType">
- <xs:attribute name="value" use="required">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="block"/>
- <xs:enumeration value="discard"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- <xs:complexType name="positiveIntType">
- <xs:attribute name="value" use="required" type="xs:positiveInteger"/>
- </xs:complexType>
- <xs:complexType name="booleanValueType">
- <xs:attribute name="value" use="required" type="xs:boolean"/>
- </xs:complexType>
- <xs:complexType name="valueType">
- <xs:attribute name="value" use="required" type="xs:string"/>
- </xs:complexType>
- <xs:complexType name="pathType">
- <xs:attribute name="relative-to" use="optional" type="xs:string"/>
- <xs:attribute name="path" use="required" type="xs:string"/>
- </xs:complexType>
- <xs:complexType name="sizeType">
- <xs:attribute name="value">
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <!-- XSD doesn't allow ^ or $ so ^[0-9]+[bkmgtp]?$ is invalid -->
- <xs:pattern value="[0-9]+[bkmgtp]"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- <xs:complexType name="facilityType">
- <xs:annotation>
- <xs:documentation>
- Facility as defined by RFC-5424 (http://tools.ietf.org/html/rfc5424)and RFC-3164
- (http://tools.ietf.org/html/rfc3164).
- </xs:documentation>
- </xs:annotation>
- <xs:attribute name="value" use="required">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="kernel"/>
- <xs:enumeration value="user-level"/>
- <xs:enumeration value="mail-system"/>
- <xs:enumeration value="system-daemons"/>
- <xs:enumeration value="security"/>
- <xs:enumeration value="syslogd"/>
- <xs:enumeration value="line-printer"/>
- <xs:enumeration value="network-news"/>
- <xs:enumeration value="uucp"/>
- <xs:enumeration value="clock-daemon"/>
- <xs:enumeration value="security2"/>
- <xs:enumeration value="ftp-daemon"/>
- <xs:enumeration value="ntp"/>
- <xs:enumeration value="log-audit"/>
- <xs:enumeration value="log-alert"/>
- <xs:enumeration value="clock-daemon2"/>
- <xs:enumeration value="local-use-0"/>
- <xs:enumeration value="local-use-1"/>
- <xs:enumeration value="local-use-2"/>
- <xs:enumeration value="local-use-3"/>
- <xs:enumeration value="local-use-4"/>
- <xs:enumeration value="local-use-5"/>
- <xs:enumeration value="local-use-6"/>
- <xs:enumeration value="local-use-7"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- <!-- Formatters -->
- <xs:complexType name="formatterType">
- <xs:annotation>
- <xs:documentation>
- Defines a formatter.
- </xs:documentation>
- </xs:annotation>
- <xs:choice minOccurs="1" maxOccurs="1">
- <xs:element name="pattern-formatter" type="patternFormatterType" maxOccurs="1"/>
- </xs:choice>
- </xs:complexType>
- <xs:complexType name="patternFormatterType">
- <xs:annotation>
- <xs:documentation>
- Defines a pattern formatter. See the documentation for org.jboss.logmanager.formatters.FormatStringParser
- for more information about the format string.
- </xs:documentation>
- </xs:annotation>
- <xs:attribute name="pattern" type="xs:string" use="required"/>
- </xs:complexType>
- <xs:complexType name="syslogFormatterType">
- <xs:annotation>
- <xs:documentation>
- Defines a formatter.
- </xs:documentation>
- </xs:annotation>
- <xs:choice minOccurs="1" maxOccurs="1">
- <xs:element name="syslog-format" type="syslogFormatType" maxOccurs="1"/>
- </xs:choice>
- </xs:complexType>
- <xs:complexType name="syslogFormatType">
- <xs:annotation>
- <xs:documentation>
- Formats the log message according to the RFC specification.
- </xs:documentation>
- </xs:annotation>
- <xs:attribute name="syslog-type" use="required">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="RFC5424">
- <xs:annotation>
- <xs:documentation>
- Formats the message according the the RFC-5424 specification
- (http://tools.ietf.org/html/rfc5424#section-6)
- </xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="RFC3164">
- <xs:annotation>
- <xs:documentation>
- Formats the message according the the RFC-3164 specification
- (http://tools.ietf.org/html/rfc3164#section-4.1)
- </xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- </xs:schema>
|