1 <?xml version="1.0" encoding="UTF-8" ?>
3 Licensed to the Apache Software Foundation (ASF) under one or more
4 contributor license agreements. See the NOTICE file distributed with
5 this work for additional information regarding copyright ownership.
6 The ASF licenses this file to You under the Apache License, Version 2.0
7 (the "License"); you may not use this file except in compliance with
8 the License. You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
19 <!-- Authors: Chris Taylor, Ceki Gulcu. -->
23 <!-- A configuration element consists of optional renderer
24 elements,appender elements, categories and an optional root
27 <!ELEMENT log4j:configuration (renderer*, appender*,plugin*, (category|logger)*,root?,
28 (categoryFactory|loggerFactory)?)>
30 <!-- The "threshold" attribute takes a level value below which -->
31 <!-- all logging statements are disabled. -->
33 <!-- Setting the "debug" enable the printing of internal log4j logging -->
36 <!-- By default, debug attribute is "null", meaning that we not do touch -->
37 <!-- internal log4j logging settings. The "null" value for the threshold -->
38 <!-- attribute can be misleading. The threshold field of a repository -->
39 <!-- cannot be set to null. The "null" value for the threshold attribute -->
40 <!-- simply means don't touch the threshold field, the threshold field -->
41 <!-- keeps its old value. -->
43 <!ATTLIST log4j:configuration
44 xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/"
45 threshold (all|trace|debug|info|warn|error|fatal|off|null) "null"
46 debug (true|false|null) "null"
47 reset (true|false) "false"
50 <!-- renderer elements allow the user to customize the conversion of -->
51 <!-- message objects to String. -->
53 <!ELEMENT renderer EMPTY>
55 renderedClass CDATA #REQUIRED
56 renderingClass CDATA #REQUIRED
59 <!-- Appenders must have a name and a class. -->
60 <!-- Appenders may contain an error handler, a layout, optional parameters -->
61 <!-- and filters. They may also reference (or include) other appenders. -->
62 <!ELEMENT appender (errorHandler?, param*,
63 rollingPolicy?, triggeringPolicy?, connectionSource?,
64 layout?, filter*, appender-ref*)>
70 <!ELEMENT layout (param*)>
75 <!ELEMENT filter (param*)>
80 <!-- ErrorHandlers can be of any class. They can admit any number of -->
83 <!ELEMENT errorHandler (param*, root-ref?, logger-ref*, appender-ref?)>
84 <!ATTLIST errorHandler
88 <!ELEMENT root-ref EMPTY>
90 <!ELEMENT logger-ref EMPTY>
95 <!ELEMENT param EMPTY>
102 <!-- The priority class is org.apache.log4j.Level by default -->
103 <!ELEMENT priority (param*)>
106 value CDATA #REQUIRED
109 <!-- The level class is org.apache.log4j.Level by default -->
110 <!ELEMENT level (param*)>
113 value CDATA #REQUIRED
117 <!-- If no level element is specified, then the configurator MUST not -->
118 <!-- touch the level of the named category. -->
119 <!ELEMENT category (param*,(priority|level)?,appender-ref*)>
123 additivity (true|false) "true"
126 <!-- If no level element is specified, then the configurator MUST not -->
127 <!-- touch the level of the named logger. -->
128 <!ELEMENT logger (level?,appender-ref*)>
131 additivity (true|false) "true"
135 <!ELEMENT categoryFactory (param*)>
136 <!ATTLIST categoryFactory
137 class CDATA #REQUIRED>
139 <!ELEMENT loggerFactory (param*)>
140 <!ATTLIST loggerFactory
141 class CDATA #REQUIRED>
143 <!ELEMENT appender-ref EMPTY>
144 <!ATTLIST appender-ref
148 <!-- plugins must have a name and class and can have optional parameters -->
149 <!ELEMENT plugin (param*, connectionSource?)>
152 class CDATA #REQUIRED
155 <!ELEMENT connectionSource (dataSource?, param*)>
156 <!ATTLIST connectionSource
157 class CDATA #REQUIRED
160 <!ELEMENT dataSource (param*)>
162 class CDATA #REQUIRED
165 <!ELEMENT triggeringPolicy ((param|filter)*)>
166 <!ATTLIST triggeringPolicy
168 class CDATA #REQUIRED
171 <!ELEMENT rollingPolicy (param*)>
172 <!ATTLIST rollingPolicy
174 class CDATA #REQUIRED
178 <!-- If no priority element is specified, then the configurator MUST not -->
179 <!-- touch the priority of root. -->
180 <!-- The root category always exists and cannot be subclassed. -->
181 <!ELEMENT root (param*, (priority|level)?, appender-ref*)>
184 <!-- ==================================================================== -->
185 <!-- A logging event -->
186 <!-- ==================================================================== -->
187 <!ELEMENT log4j:eventSet (log4j:event*)>
188 <!ATTLIST log4j:eventSet
189 xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/"
190 version (1.1|1.2) "1.2"
191 includesLocationInfo (true|false) "true"
196 <!ELEMENT log4j:event (log4j:message, log4j:NDC?, log4j:throwable?,
197 log4j:locationInfo?, log4j:properties?) >
199 <!-- The timestamp format is application dependent. -->
200 <!ATTLIST log4j:event
201 logger CDATA #REQUIRED
202 level CDATA #REQUIRED
203 thread CDATA #REQUIRED
204 timestamp CDATA #REQUIRED
208 <!ELEMENT log4j:message (#PCDATA)>
209 <!ELEMENT log4j:NDC (#PCDATA)>
211 <!ELEMENT log4j:throwable (#PCDATA)>
213 <!ELEMENT log4j:locationInfo EMPTY>
214 <!ATTLIST log4j:locationInfo
215 class CDATA #REQUIRED
216 method CDATA #REQUIRED
221 <!ELEMENT log4j:properties (log4j:data*)>
223 <!ELEMENT log4j:data EMPTY>
226 value CDATA #REQUIRED