[jboss-cvs] JBossAS SVN: r90817 - projects/logging-service-metadata/trunk/src/main/resources/META-INF/schema.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Jul 5 12:30:40 EDT 2009


Author: david.lloyd at jboss.com
Date: 2009-07-05 12:30:40 -0400 (Sun, 05 Jul 2009)
New Revision: 90817

Modified:
   projects/logging-service-metadata/trunk/src/main/resources/META-INF/schema/jboss-logging_5_0.xsd
Log:
The completed jboss-logging.xml schema

Modified: projects/logging-service-metadata/trunk/src/main/resources/META-INF/schema/jboss-logging_5_0.xsd
===================================================================
--- projects/logging-service-metadata/trunk/src/main/resources/META-INF/schema/jboss-logging_5_0.xsd	2009-07-04 19:57:32 UTC (rev 90816)
+++ projects/logging-service-metadata/trunk/src/main/resources/META-INF/schema/jboss-logging_5_0.xsd	2009-07-05 16:30:40 UTC (rev 90817)
@@ -2,50 +2,462 @@
 
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
             xmlns:xhtml="http://www.w3.org/1999/xhtml"
-            targetNamespace="urn:jboss:jboss-logging:5.0"
-            xmlns="urn:jboss:jboss-logging:5.0"
+            xmlns:bd="urn:jboss:bean-deployer:2.0"
+            targetNamespace="urn:jboss:logging:6.0"
+            xmlns="urn:jboss:logging:6.0"
             elementFormDefault="qualified"
             attributeFormDefault="unqualified"
             version="1.0">
 
-    <xs:complexType name="logging">
-        <xs:sequence minOccurs="0" maxOccurs="unbounded">
-            <xs:choice>
-                <xs:element name="logger" type="logger"/>
-            </xs:choice>
-        </xs:sequence>
-        <xs:attribute name="context" type="xs:string"/>
+    <!-- Allow access to schema elements from the bean-deployer namespace -->
+    <xs:import namespace="urn:jboss:bean-deployer:2.0"/>
+
+    <xs:element name="logging" type="loggingType"/>
+
+    <xs:complexType name="loggingType">
+        <xs:annotation>
+            <xs:documentation>
+                The logging configuration root type.  Contains a list of named handlers, loggers, and formatters for
+                this configuration.  Use the "context" annotation to define a logging context separate from the
+                default system context.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:choice minOccurs="0" maxOccurs="unbounded">
+            <!-- handlers -->
+            <xs:group ref="handlersGroup"/>
+            <!-- loggers -->
+            <xs:element name="logger" type="loggerType"/>
+            <xs:element name="root-logger" type="rootLoggerType"/>
+            <!-- formatters -->
+            <xs:element name="formatter" type="formatterType"/>
+        </xs:choice>
+        <xs:attribute name="context" type="xs:string" use="optional"/>
     </xs:complexType>
 
-    <xs:complexType name="logger">
-        <xs:sequence minOccurs="1" maxOccurs="1">
-            <xs:element name="level" type="ref" minOccurs="0"/>
-            <xs:element name="filter-ref" type="ref" minOccurs="0"/>
-            <xs:element name="handler-ref" type="ref" minOccurs="0" maxOccurs="unbounded"/>
-        </xs:sequence>
+    <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="handler">
-        <xs:sequence>
-            <xs:element name="filter-ref" type="ref" minOccurs="0"/>
-            <xs:element name="formatter-ref" type="ref" minOccurs="0"/>
-            <xs:element name="level" type="ref" minOccurs="0"/>
-            <xs:element name="error-manager-ref" type="ref" minOccurs="0"/>
-            <xs:element name="logger" type="logger-ref" minOccurs="0" maxOccurs="unbounded"/>
+    <xs:complexType name="propertiesType">
+        <xs:annotation>
+            <xs:documentation>
+                A collection of named JavaBean-style properties to apply to the enclosing object.  The properties
+                are applied in the order given.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence minOccurs="0" maxOccurs="unbounded">
+            <xs:element name="property" type="bd:propertyType"/>
         </xs:sequence>
-        <xs:attribute name="name" type="xs:string" use="required"/>
-        <xs:attribute name="encoding" type="xs:string"/>
     </xs:complexType>
 
-    <xs:complexType name="ref">
-        <xs:attribute name="name" type="xs:string" use="required"/>
+    <!-- Loggers -->
+
+    <xs:complexType name="loggersType">
+        <xs:annotation>
+            <xs:documentation>
+                A collection of logger references to apply to the enclosing object.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:choice maxOccurs="unbounded">
+            <xs:group ref="loggersGroup"/>
+        </xs:choice>
     </xs:complexType>
 
-    <xs:complexType name="logger-ref">
-        <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:group name="loggersGroup">
+        <xs:annotation>
+            <xs:documentation>
+                An element group for the collection of logger references to apply to the enclosing object.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:choice>
+            <xs:element name="logger" type="loggerRefType"/>
+            <xs:element name="root-logger" type="contextRefType"/>
+        </xs:choice>
+    </xs:group>
+
+    <xs:complexType name="contextRefType">
+        <xs:annotation>
+            <xs:documentation>
+                An object which contains an optional reference to a logging context.
+            </xs:documentation>
+        </xs:annotation>
         <xs:attribute name="context" type="xs:string" use="optional"/>
     </xs:complexType>
 
-    <xs:element name="logging" type="logging"/>
+    <xs:complexType name="loggerRefType">
+        <xs:annotation>
+            <xs:documentation>
+                An object which contains a reference to a logger category and an optional reference to a logging context.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexContent>
+            <xs:extension base="contextRefType">
+                <xs:attribute name="category" type="xs:string" use="required"/>
+            </xs:extension>
+        </xs:complexContent>
+    </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" type="filter" minOccurs="0"/>
+            <xs:element name="handlers" minOccurs="0" type="handlersType"/>
+        </xs:all>
+    </xs:complexType>
+
+    <xs:complexType name="loggerType">
+        <xs:annotation>
+            <xs:documentation>
+                Defines a logger category for this log context.
+            </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>
+
+    <!-- Handlers -->
+
+    <xs:group name="handlersGroup">
+        <xs:annotation>
+            <xs:documentation>
+                An element group for the collection of handlers to apply to the enclosing object.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:choice>
+            <xs:element name="handler" type="handlerType"/>
+            <xs:element name="log4j-appender" type="log4jAppenderType"/>
+            <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="asyncHandler"/>
+            <xs:element name="null-handler" type="handlerBaseType"/>
+        </xs:choice>
+    </xs:group>
+
+    <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-ref" type="refType"/>
+            <xs:element name="value" type="bd:valueType"/>
+            <!-- actual handler types -->
+            <xs:group ref="handlersGroup"/>
+        </xs:choice>
+    </xs:complexType>
+
+    <xs:complexType name="installHandlerType">
+        <xs:annotation>
+            <xs:documentation>
+                Defines an installation of a handler into one or more loggers.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:all minOccurs="1" maxOccurs="1">
+            <xs:element name="handler-ref" type="refType" minOccurs="1"/>
+            <xs:element name="loggers" minOccurs="1" type="loggersType"/>
+        </xs:all>
+    </xs:complexType>
+
+    <xs:complexType name="handlerBaseType">
+        <xs:annotation>
+            <xs:documentation>
+                The base type for all handlers.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:all>
+            <xs:element name="level" type="refType" minOccurs="0"/>
+            <xs:element name="filter" type="filter" minOccurs="0"/>
+            <xs:element name="error-manager" type="errorManagerType" minOccurs="0"/>
+            <xs:element name="formatter" type="formatterType" minOccurs="0"/>
+            <xs:element name="loggers" type="loggersType" minOccurs="0"/>
+            <xs:element name="sub-handlers" type="handlersType" minOccurs="0"/>
+            <xs:element name="properties" type="propertiesType" minOccurs="0"/>
+        </xs:all>
+        <xs:attribute name="name" type="xs:string" use="optional"/>
+        <xs:attribute name="encoding" type="xs:string" use="optional"/>
+        <xs:attribute name="autoflush" type="xs:boolean" use="optional" default="false"/>
+    </xs:complexType>
+
+    <xs:complexType name="handlerType">
+        <xs:annotation>
+            <xs:documentation>
+                Defines a handler of the given class to be instantiated and optionally installed into one or more
+                loggers.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexContent>
+            <xs:extension base="handlerBaseType">
+                <xs:all minOccurs="1" maxOccurs="1">
+                    <xs:element name="level" type="refType" minOccurs="0"/>
+                    <xs:element name="filter" type="filter" minOccurs="0"/>
+                    <xs:element name="formatter" type="formatterType" minOccurs="0"/>
+                    <xs:element name="loggers" type="loggersType" minOccurs="0"/>
+                    <xs:element name="properties" type="propertiesType" minOccurs="0"/>
+                    <xs:element name="error-manager" type="errorManagerType" minOccurs="0"/>
+                    <xs:element name="sub-handlers" type="handlersType" minOccurs="0"/>
+                </xs:all>
+                <xs:attribute name="class" type="xs:token" use="required"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:complexType name="log4jAppenderType">
+        <xs:annotation>
+            <xs:documentation>
+                Defines a log4j appender of the given class to be instantiated and optionally installed into one or more
+                loggers.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexContent>
+            <xs:extension base="handlerType"/>
+        </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:complexContent>
+            <xs:extension base="handlerBaseType">
+                <xs:attribute name="target" type="consoleTargetType" use="optional" default="System.out"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:simpleType name="consoleTargetType">
+        <xs:annotation>
+            <xs:documentation>
+                Defines a the target for a console handler (System.out or System.err).
+            </xs:documentation>
+        </xs:annotation>
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="System.out"/>
+            <xs:enumeration value="System.err"/>
+        </xs:restriction>
+    </xs:simpleType>
+
+    <xs:complexType name="fileHandlerType">
+        <xs:annotation>
+            <xs:documentation>
+                Defines a handler which writes to a file.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexContent>
+            <xs:extension base="handlerBaseType">
+                <xs:attribute name="file-name" type="xs:string" use="required"/>
+                <xs:attribute name="append" type="xs:boolean" use="optional"/>
+            </xs:extension>
+        </xs:complexContent>
+    </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:complexContent>
+            <xs:extension base="fileHandlerType">
+                <xs:attribute name="suffix" type="xs:string" use="required"/>
+            </xs:extension>
+        </xs:complexContent>
+    </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:complexContent>
+            <xs:extension base="fileHandlerType">
+                <xs:attribute name="rotate-size" type="xs:string" use="optional" default="500k"/>
+                <xs:attribute name="max-backup-index" type="xs:positiveInteger" use="optional" default="1"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:complexType name="asyncHandler">
+        <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:complexContent>
+            <xs:extension base="handlerBaseType"/>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <!-- Filters -->
+
+    <xs:complexType name="filter">
+        <xs:annotation>
+            <xs:documentation>
+                Defines a named logging filter.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:group ref="simpleFilterGroup"/>
+        <xs:attribute name="name" use="optional"/>
+    </xs:complexType>
+
+    <xs:complexType name="simpleFilterType">
+        <xs:annotation>
+            <xs:documentation>
+                Defines a simple filter type.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:group ref="simpleFilterGroup"/>
+    </xs:complexType>
+
+    <xs:complexType name="multiFilterType">
+        <xs:annotation>
+            <xs:documentation>
+                Defines a composite filter type.  The "any" filter will return true of any of its constituent filters
+                returns true; the "all" filter will return false if any of its constituent filters returns false.  Both
+                composite filter types are short-circuiting, meaning that if the result can be determined with an earlier
+                filter, later filters are not run.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:group ref="simpleFilterGroup" maxOccurs="unbounded"/>
+    </xs:complexType>
+
+    <xs:group name="simpleFilterGroup">
+        <xs:choice>
+            <xs:element name="all" type="multiFilterType"/>
+            <xs:element name="any" type="multiFilterType"/>
+            <xs:element name="accept"/>
+            <xs:element name="deny"/>
+            <xs:element name="not" type="simpleFilterType"/>
+            <xs:element name="match" type="regexFilterType"/>
+            <xs:element name="replace" type="replaceFilterType"/>
+            <xs:element name="level" type="levelFilterType"/>
+            <xs:element name="level-range" type="levelRangeFilterType"/>
+            <xs:element name="change-level" type="levelChangeFilterType"/>
+            <xs:element name="filter-ref" type="refType"/>
+            <xs:element name="value" type="bd:valueType"/>
+        </xs:choice>
+    </xs:group>
+
+    <xs:complexType name="regexFilterType">
+        <xs:annotation>
+            <xs:documentation>
+                A regular expression-based filter.  The filter returns true if the pattern matches.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:attribute name="pattern" type="xs:string" use="required"/>
+    </xs:complexType>
+
+    <xs:complexType name="replaceFilterType">
+        <xs:annotation>
+            <xs:documentation>
+                A regular expression substitution filter.  This filter modifies the log message and always returns true.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:attribute name="pattern" type="xs:string" use="required"/>
+        <xs:attribute name="replacement" type="xs:string" use="required"/>
+        <xs:attribute name="replaceAll" type="xs:boolean" default="true"/>
+    </xs:complexType>
+
+    <xs:complexType name="levelFilterType">
+        <xs:annotation>
+            <xs:documentation>
+                A level filter.  This filter returns true if the log message level matches the parameter.  It is a
+                numerical match; two differently-named levels with the same numeric value will be considered equal.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:attribute name="level" type="xs:string" use="required"/>
+    </xs:complexType>
+
+    <xs:complexType name="levelRangeFilterType">
+        <xs:annotation>
+            <xs:documentation>
+                A level range filter.  This filter returns true if the log message level matches the range specified
+                by the parameters.  It is a
+                numerical match; two differently-named levels with the same numeric value will be considered equal.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:attribute name="min-level" type="xs:string" use="required"/>
+        <xs:attribute name="min-inclusive" type="xs:boolean" use="optional" default="true"/>
+        <xs:attribute name="max-level" type="xs:string" use="required"/>
+        <xs:attribute name="max-inclusive" type="xs:boolean" use="optional" default="true"/>
+    </xs:complexType>
+
+    <xs:complexType name="levelChangeFilterType">
+        <xs:annotation>
+            <xs:documentation>
+                A level change filter.  This filter modifies the log message and always returns true.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:attribute name="level" type="xs:string" use="required"/>
+    </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:element name="formatter-ref" type="refType" maxOccurs="1"/>
+            <xs:element name="value" type="bd:valueType" 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:attribute name="name" type="xs:string" use="optional"/>
+    </xs:complexType>
+
+    <!-- Error managers -->
+
+    <xs:complexType name="errorManagerType">
+        <xs:annotation>
+            <xs:documentation>
+                Defines a handler error-manager.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:choice minOccurs="1" maxOccurs="1">
+            <xs:element name="value" type="bd:valueType"/>
+            <xs:element name="only-once">
+                <xs:complexType>
+                    <xs:annotation>
+                        <xs:documentation>
+                            An error manager which logs errors to System.err only the first time an error occurs.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:complexType>
+            </xs:element>
+        </xs:choice>
+    </xs:complexType>
 </xs:schema>




More information about the jboss-cvs-commits mailing list