Configure logging with <Logging> element in origin.xml.
[java-idp.git] / src / schemas / origin.xsd
index 3fdc28c..42b79d1 100644 (file)
@@ -1,7 +1,43 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<xs:schema targetNamespace="urn:mace:shibboleth:origin:1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:credentials="urn:mace:shibboleth:credentials:1.0" xmlns:namemapper="urn:mace:shibboleth:namemapper:1.0" xmlns:origin="urn:mace:shibboleth:origin:1.0" elementFormDefault="qualified" attributeFormDefault="unqualified">
+<xs:schema 
+       targetNamespace="urn:mace:shibboleth:origin:1.0" 
+       xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+       xmlns:credentials="urn:mace:shibboleth:credentials:1.0" 
+       xmlns:namemapper="urn:mace:shibboleth:namemapper:1.0" 
+       xmlns:origin="urn:mace:shibboleth:origin:1.0" 
+       elementFormDefault="qualified" 
+       attributeFormDefault="unqualified">
+
        <xs:import namespace="urn:mace:shibboleth:credentials:1.0" schemaLocation="credentials.xsd"/>
        <xs:import namespace="urn:mace:shibboleth:namemapper:1.0" schemaLocation="namemapper.xsd"/>
+
+       <xs:simpleType name="LevelType">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="OFF"/>
+                       <xs:enumeration value="FATAL"/>
+                       <xs:enumeration value="ERROR"/>
+                       <xs:enumeration value="WARN"/>
+                       <xs:enumeration value="INFO"/>
+                       <xs:enumeration value="DEBUG"/>
+               </xs:restriction>
+       </xs:simpleType>
+
+       <xs:complexType name="LogWithLevels">
+               <xs:attribute name="location" type="xs:anyURI" use="required" />
+               <xs:attribute name="level" type="origin:LevelType" use="optional" default="WARN" />
+       </xs:complexType>
+
+       <xs:complexType name="Log">
+               <xs:attribute name="location" type="xs:anyURI" use="required"/>
+       </xs:complexType>
+
+       <xs:simpleType name="Log4JConfigType">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="properties"/>
+                       <xs:enumeration value="xml"/>
+               </xs:restriction>
+       </xs:simpleType>
+
        <xs:element name="ShibbolethOriginConfig">
                <xs:annotation>
                        <xs:documentation>Configures the Shibboleth Origin software.</xs:documentation>
                                                </xs:sequence>
                                        </xs:complexType>
                                </xs:element>
+
+                               <xs:element name="Logging" minOccurs="0" maxOccurs="1">
+                                       <xs:complexType>
+                                               <xs:choice>
+                                                       <xs:sequence>
+                                                               <xs:element name="ErrorLog" type="origin:LogWithLevels" minOccurs="0" maxOccurs="1" />
+                                                               <xs:element name="TransactionLog" type="origin:Log" minOccurs="0" maxOccurs="1" />
+                                                       </xs:sequence>
+                                                       <xs:element name="Log4JConfig">
+                                                               <xs:complexType>
+                                                                       <xs:attribute name="type" type="origin:Log4JConfigType" use="optional" default="properties" />
+                                                                       <xs:attribute name="location" type="xs:anyURI" use="required" />
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                               </xs:choice>
+                                       </xs:complexType>
+                               </xs:element>
+
                                <xs:sequence>
                                        <xs:element ref="namemapper:NameMapping" maxOccurs="unbounded"/>
                                </xs:sequence>
+
                                <xs:element ref="credentials:Credentials"/>
+
                        </xs:sequence>
+
                        <xs:attribute name="resolverConfig" type="xs:string" use="optional" default="/conf/resolver.xml"/>
                        <xs:attribute name="AAUrl" type="xs:anyURI" use="optional"/>
                        <xs:attribute name="providerId" type="xs:anyURI" use="required"/>
                        <xs:attribute name="maxHSThreads" type="xs:integer" use="optional"/>
                </xs:complexType>
        </xs:element>
+
 </xs:schema>