1<?xml version="1.0" encoding="UTF-8" ?> 2<!-- 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 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 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. 17--> 18 19<!-- Authors: Chris Taylor, Ceki Gulcu. --> 20 21<!-- Version: 1.2 --> 22 23<!-- A configuration element consists of optional renderer 24elements,appender elements, categories and an optional root 25element. --> 26 27<!ELEMENT log4j:configuration (renderer*, throwableRenderer?, 28 appender*,plugin*, (category|logger)*,root?, 29 (categoryFactory|loggerFactory)?)> 30 31<!-- The "threshold" attribute takes a level value below which --> 32<!-- all logging statements are disabled. --> 33 34<!-- Setting the "debug" enable the printing of internal log4j logging --> 35<!-- statements. --> 36 37<!-- By default, debug attribute is "null", meaning that we not do touch --> 38<!-- internal log4j logging settings. The "null" value for the threshold --> 39<!-- attribute can be misleading. The threshold field of a repository --> 40<!-- cannot be set to null. The "null" value for the threshold attribute --> 41<!-- simply means don't touch the threshold field, the threshold field --> 42<!-- keeps its old value. --> 43 44<!ATTLIST log4j:configuration 45 xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/" 46 threshold (all|trace|debug|info|warn|error|fatal|off|null) "null" 47 debug (true|false|null) "null" 48 reset (true|false) "false" 49> 50 51<!-- renderer elements allow the user to customize the conversion of --> 52<!-- message objects to String. --> 53 54<!ELEMENT renderer EMPTY> 55<!ATTLIST renderer 56 renderedClass CDATA #REQUIRED 57 renderingClass CDATA #REQUIRED 58> 59 60<!-- throwableRenderer allows the user to customize the conversion 61 of exceptions to a string representation. --> 62<!ELEMENT throwableRenderer (param*)> 63<!ATTLIST throwableRenderer 64 class CDATA #REQUIRED 65> 66 67 68<!-- Appenders must have a name and a class. --> 69<!-- Appenders may contain an error handler, a layout, optional parameters --> 70<!-- and filters. They may also reference (or include) other appenders. --> 71<!ELEMENT appender (errorHandler?, param*, 72 rollingPolicy?, triggeringPolicy?, connectionSource?, 73 layout?, filter*, appender-ref*)> 74<!ATTLIST appender 75 name CDATA #REQUIRED 76 class CDATA #REQUIRED 77> 78 79<!ELEMENT layout (param*)> 80<!ATTLIST layout 81 class CDATA #REQUIRED 82> 83 84<!ELEMENT filter (param*)> 85<!ATTLIST filter 86 class CDATA #REQUIRED 87> 88 89<!-- ErrorHandlers can be of any class. They can admit any number of --> 90<!-- parameters. --> 91 92<!ELEMENT errorHandler (param*, root-ref?, logger-ref*, appender-ref?)> 93<!ATTLIST errorHandler 94 class CDATA #REQUIRED 95> 96 97<!ELEMENT root-ref EMPTY> 98 99<!ELEMENT logger-ref EMPTY> 100<!ATTLIST logger-ref 101 ref CDATA #REQUIRED 102> 103 104<!ELEMENT param EMPTY> 105<!ATTLIST param 106 name CDATA #REQUIRED 107 value CDATA #REQUIRED 108> 109 110 111<!-- The priority class is org.apache.log4j.Level by default --> 112<!ELEMENT priority (param*)> 113<!ATTLIST priority 114 class CDATA #IMPLIED 115 value CDATA #REQUIRED 116> 117 118<!-- The level class is org.apache.log4j.Level by default --> 119<!ELEMENT level (param*)> 120<!ATTLIST level 121 class CDATA #IMPLIED 122 value CDATA #REQUIRED 123> 124 125 126<!-- If no level element is specified, then the configurator MUST not --> 127<!-- touch the level of the named category. --> 128<!ELEMENT category (param*,(priority|level)?,appender-ref*)> 129<!ATTLIST category 130 class CDATA #IMPLIED 131 name CDATA #REQUIRED 132 additivity (true|false) "true" 133> 134 135<!-- If no level element is specified, then the configurator MUST not --> 136<!-- touch the level of the named logger. --> 137<!ELEMENT logger (param*,level?,appender-ref*)> 138<!ATTLIST logger 139 class CDATA #IMPLIED 140 name CDATA #REQUIRED 141 additivity (true|false) "true" 142> 143 144 145<!ELEMENT categoryFactory (param*)> 146<!ATTLIST categoryFactory 147 class CDATA #REQUIRED> 148 149<!ELEMENT loggerFactory (param*)> 150<!ATTLIST loggerFactory 151 class CDATA #REQUIRED> 152 153<!ELEMENT appender-ref EMPTY> 154<!ATTLIST appender-ref 155 ref CDATA #REQUIRED 156> 157 158<!-- plugins must have a name and class and can have optional parameters --> 159<!ELEMENT plugin (param*, connectionSource?)> 160<!ATTLIST plugin 161 name CDATA #REQUIRED 162 class CDATA #REQUIRED 163> 164 165<!ELEMENT connectionSource (dataSource?, param*)> 166<!ATTLIST connectionSource 167 class CDATA #REQUIRED 168> 169 170<!ELEMENT dataSource (param*)> 171<!ATTLIST dataSource 172 class CDATA #REQUIRED 173> 174 175<!ELEMENT triggeringPolicy ((param|filter)*)> 176<!ATTLIST triggeringPolicy 177 name CDATA #IMPLIED 178 class CDATA #REQUIRED 179> 180 181<!ELEMENT rollingPolicy (param*)> 182<!ATTLIST rollingPolicy 183 name CDATA #IMPLIED 184 class CDATA #REQUIRED 185> 186 187 188<!-- If no priority element is specified, then the configurator MUST not --> 189<!-- touch the priority of root. --> 190<!-- The root category always exists and cannot be subclassed. --> 191<!ELEMENT root (param*, (priority|level)?, appender-ref*)> 192 193 194<!-- ==================================================================== --> 195<!-- A logging event --> 196<!-- ==================================================================== --> 197<!ELEMENT log4j:eventSet (log4j:event*)> 198<!ATTLIST log4j:eventSet 199 xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/" 200 version (1.1|1.2) "1.2" 201 includesLocationInfo (true|false) "true" 202> 203 204 205 206<!ELEMENT log4j:event (log4j:message, log4j:NDC?, log4j:throwable?, 207 log4j:locationInfo?, log4j:properties?) > 208 209<!-- The timestamp format is application dependent. --> 210<!ATTLIST log4j:event 211 logger CDATA #REQUIRED 212 level CDATA #REQUIRED 213 thread CDATA #REQUIRED 214 timestamp CDATA #REQUIRED 215 time CDATA #IMPLIED 216> 217 218<!ELEMENT log4j:message (#PCDATA)> 219<!ELEMENT log4j:NDC (#PCDATA)> 220 221<!ELEMENT log4j:throwable (#PCDATA)> 222 223<!ELEMENT log4j:locationInfo EMPTY> 224<!ATTLIST log4j:locationInfo 225 class CDATA #REQUIRED 226 method CDATA #REQUIRED 227 file CDATA #REQUIRED 228 line CDATA #REQUIRED 229> 230 231<!ELEMENT log4j:properties (log4j:data*)> 232 233<!ELEMENT log4j:data EMPTY> 234<!ATTLIST log4j:data 235 name CDATA #REQUIRED 236 value CDATA #REQUIRED 237> 238