log4j.dtd 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!-- Authors: Chris Taylor, Ceki Gulcu. -->
  3. <!-- Version: 1.2 -->
  4. <!-- A configuration element consists of optional renderer
  5. elements,appender elements, categories and an optional root
  6. element. -->
  7. <!ELEMENT log4j:configuration (renderer*, appender*,(category|logger)*,root?,
  8. categoryFactory?)>
  9. <!-- The "threshold" attribute takes a level value such that all -->
  10. <!-- logging statements with a level equal or below this value are -->
  11. <!-- disabled. -->
  12. <!-- Setting the "debug" enable the printing of internal log4j logging -->
  13. <!-- statements. -->
  14. <!-- By default, debug attribute is "null", meaning that we not do touch -->
  15. <!-- internal log4j logging settings. The "null" value for the threshold -->
  16. <!-- attribute can be misleading. The threshold field of a repository -->
  17. <!-- cannot be set to null. The "null" value for the threshold attribute -->
  18. <!-- simply means don't touch the threshold field, the threshold field -->
  19. <!-- keeps its old value. -->
  20. <!ATTLIST log4j:configuration
  21. xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/"
  22. threshold (all|debug|info|warn|error|fatal|off|null) "null"
  23. debug (true|false|null) "null"
  24. >
  25. <!-- renderer elements allow the user to customize the conversion of -->
  26. <!-- message objects to String. -->
  27. <!ELEMENT renderer EMPTY>
  28. <!ATTLIST renderer
  29. renderedClass CDATA #REQUIRED
  30. renderingClass CDATA #REQUIRED
  31. >
  32. <!-- Appenders must have a name and a class. -->
  33. <!-- Appenders may contain an error handler, a layout, optional parameters -->
  34. <!-- and filters. They may also reference (or include) other appenders. -->
  35. <!ELEMENT appender (errorHandler?, param*, layout?, filter*, appender-ref*)>
  36. <!ATTLIST appender
  37. name ID #REQUIRED
  38. class CDATA #REQUIRED
  39. >
  40. <!ELEMENT layout (param*)>
  41. <!ATTLIST layout
  42. class CDATA #REQUIRED
  43. >
  44. <!ELEMENT filter (param*)>
  45. <!ATTLIST filter
  46. class CDATA #REQUIRED
  47. >
  48. <!-- ErrorHandlers can be of any class. They can admit any number of -->
  49. <!-- parameters. -->
  50. <!ELEMENT errorHandler (param*, root-ref?, logger-ref*, appender-ref?)>
  51. <!ATTLIST errorHandler
  52. class CDATA #REQUIRED
  53. >
  54. <!ELEMENT root-ref EMPTY>
  55. <!ELEMENT logger-ref EMPTY>
  56. <!ATTLIST logger-ref
  57. ref IDREF #REQUIRED
  58. >
  59. <!ELEMENT param EMPTY>
  60. <!ATTLIST param
  61. name CDATA #REQUIRED
  62. value CDATA #REQUIRED
  63. >
  64. <!-- The priority class is org.apache.log4j.Level by default -->
  65. <!ELEMENT priority (param*)>
  66. <!ATTLIST priority
  67. class CDATA #IMPLIED
  68. value CDATA #REQUIRED
  69. >
  70. <!-- The level class is org.apache.log4j.Level by default -->
  71. <!ELEMENT level (param*)>
  72. <!ATTLIST level
  73. class CDATA #IMPLIED
  74. value CDATA #REQUIRED
  75. >
  76. <!-- If no level element is specified, then the configurator MUST not -->
  77. <!-- touch the level of the named category. -->
  78. <!ELEMENT category (param*,(priority|level)?,appender-ref*)>
  79. <!ATTLIST category
  80. class CDATA #IMPLIED
  81. name CDATA #REQUIRED
  82. additivity (true|false) "true"
  83. >
  84. <!-- If no level element is specified, then the configurator MUST not -->
  85. <!-- touch the level of the named logger. -->
  86. <!ELEMENT logger (level?,appender-ref*)>
  87. <!ATTLIST logger
  88. name ID #REQUIRED
  89. additivity (true|false) "true"
  90. >
  91. <!ELEMENT categoryFactory (param*)>
  92. <!ATTLIST categoryFactory
  93. class CDATA #REQUIRED>
  94. <!ELEMENT appender-ref EMPTY>
  95. <!ATTLIST appender-ref
  96. ref IDREF #REQUIRED
  97. >
  98. <!-- If no priority element is specified, then the configurator MUST not -->
  99. <!-- touch the priority of root. -->
  100. <!-- The root category always exists and cannot be subclassed. -->
  101. <!ELEMENT root (param*, (priority|level)?, appender-ref*)>
  102. <!-- ==================================================================== -->
  103. <!-- A logging event -->
  104. <!-- ==================================================================== -->
  105. <!ELEMENT log4j:eventSet (log4j:event*)>
  106. <!ATTLIST log4j:eventSet
  107. xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/"
  108. version (1.1|1.2) "1.2"
  109. includesLocationInfo (true|false) "true"
  110. >
  111. <!ELEMENT log4j:event (log4j:message, log4j:NDC?, log4j:throwable?,
  112. log4j:locationInfo?) >
  113. <!-- The timestamp format is application dependent. -->
  114. <!ATTLIST log4j:event
  115. logger CDATA #REQUIRED
  116. level CDATA #REQUIRED
  117. thread CDATA #REQUIRED
  118. timestamp CDATA #REQUIRED
  119. >
  120. <!ELEMENT log4j:message (#PCDATA)>
  121. <!ELEMENT log4j:NDC (#PCDATA)>
  122. <!ELEMENT log4j:throwable (#PCDATA)>
  123. <!ELEMENT log4j:locationInfo EMPTY>
  124. <!ATTLIST log4j:locationInfo
  125. class CDATA #REQUIRED
  126. method CDATA #REQUIRED
  127. file CDATA #REQUIRED
  128. line CDATA #REQUIRED
  129. >