logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Kemperman (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LOG4J2-1215) Documentation/XSD inconsistencies
Date Tue, 08 Dec 2015 14:48:10 GMT
Erik Kemperman created LOG4J2-1215:

             Summary: Documentation/XSD inconsistencies
                 Key: LOG4J2-1215
                 URL: https://issues.apache.org/jira/browse/LOG4J2-1215
             Project: Log4j 2
          Issue Type: Bug
          Components: Configurators, Documentation
    Affects Versions: 2.4, 2.5
            Reporter: Erik Kemperman
            Priority: Minor

I was trying to validate my log4j2.xml against the shipped Log4j-config.xsd, but I think I've
found some inconsistencies between what the documentation says and what the xsd enforces:

- ConfigurationType doesn't allow for a "schema" attribute.
- PropertiesType doesn't allow for more than one Property.
- LayoutType requires attributes with capital letters, "Type" and "Pattern".

If I apply the following patch to the xsd, things work as expected. So I thought I'd submit
that here:

--- Log4j-config.xsd    2015-12-08 15:32:14.413679998 +0100
+++ Log4j-config.fixed.xsd      2015-12-08 15:22:25.176312276 +0100
@@ -38,10 +38,11 @@
         <xs:attribute name="strict" type="xs:string"/>
         <xs:attribute name="name" type="xs:string"/>
         <xs:attribute name="advertiser" type="xs:string"/>
+        <xs:attribute name="schema" type="xs:string"/>
     <xs:complexType name="PropertiesType">
-            <xs:element name="Property" type="PropertyType"/>
+            <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
     <xs:complexType name="AppenderType">
@@ -135,8 +136,8 @@
             <xs:element name="Pattern" type="xs:string" minOccurs="0"/>
-        <xs:attribute name="Type" type="xs:string" use="required"/>
-        <xs:attribute name="Pattern" type="xs:string" use="optional"/>
+        <xs:attribute name="type" type="xs:string" use="required"/>
+        <xs:attribute name="pattern" type="xs:string" use="optional"/>
     <xs:complexType name="ThresholdFilterType">
         <xs:attribute name="level" type="xs:string" use="optional"/>

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message