jboss-as-logging_1_1.xsd 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ JBoss, Home of Professional Open Source.
  4. ~ Copyright 2011, Red Hat, Inc., and individual contributors
  5. ~ as indicated by the @author tags. See the copyright.txt file in the
  6. ~ distribution for a full listing of individual contributors.
  7. ~
  8. ~ This is free software; you can redistribute it and/or modify it
  9. ~ under the terms of the GNU Lesser General Public License as
  10. ~ published by the Free Software Foundation; either version 2.1 of
  11. ~ the License, or (at your option) any later version.
  12. ~
  13. ~ This software is distributed in the hope that it will be useful,
  14. ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. ~ Lesser General Public License for more details.
  17. ~
  18. ~ You should have received a copy of the GNU Lesser General Public
  19. ~ License along with this software; if not, write to the Free
  20. ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  21. ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  22. -->
  23. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  24. targetNamespace="urn:jboss:domain:logging:1.1"
  25. xmlns="urn:jboss:domain:logging:1.1"
  26. elementFormDefault="qualified"
  27. attributeFormDefault="unqualified"
  28. version="1.1">
  29. <!-- The logging subsystem root element -->
  30. <xs:element name="subsystem" type="subsystem"/>
  31. <xs:complexType name="subsystem">
  32. <xs:annotation>
  33. <xs:documentation>
  34. <![CDATA[
  35. The configuration of the logging subsystem.
  36. ]]>
  37. </xs:documentation>
  38. </xs:annotation>
  39. <xs:choice minOccurs="0" maxOccurs="unbounded">
  40. <xs:element name="logger" type="loggerType"/>
  41. <xs:element name="root-logger" type="rootLoggerType"/>
  42. <xs:element name="console-handler" type="consoleHandlerType"/>
  43. <xs:element name="file-handler" type="fileHandlerType"/>
  44. <xs:element name="periodic-rotating-file-handler" type="periodicFileHandlerType"/>
  45. <xs:element name="size-rotating-file-handler" type="sizeFileHandlerType"/>
  46. <xs:element name="async-handler" type="asyncHandlerType"/>
  47. <xs:element name="custom-handler" type="customHandlerType" />
  48. </xs:choice>
  49. </xs:complexType>
  50. <xs:complexType name="propertiesType">
  51. <xs:annotation>
  52. <xs:documentation>
  53. A collection of free-form properties.
  54. </xs:documentation>
  55. </xs:annotation>
  56. <xs:choice minOccurs="0" maxOccurs="unbounded">
  57. <xs:element name="property">
  58. <xs:complexType>
  59. <xs:attribute name="name" type="xs:string" use="required"/>
  60. <xs:attribute name="value" type="xs:string" use="optional"/>
  61. </xs:complexType>
  62. </xs:element>
  63. </xs:choice>
  64. </xs:complexType>
  65. <xs:complexType name="refType">
  66. <xs:annotation>
  67. <xs:documentation>
  68. A named reference to another object.
  69. </xs:documentation>
  70. </xs:annotation>
  71. <xs:attribute name="name" type="xs:string" use="required"/>
  72. </xs:complexType>
  73. <xs:complexType name="handlersType">
  74. <xs:annotation>
  75. <xs:documentation>
  76. A collection of handlers to apply to the enclosing object.
  77. </xs:documentation>
  78. </xs:annotation>
  79. <xs:choice minOccurs="0" maxOccurs="unbounded">
  80. <xs:element name="handler" type="refType"/>
  81. </xs:choice>
  82. </xs:complexType>
  83. <xs:complexType name="rootLoggerType">
  84. <xs:annotation>
  85. <xs:documentation>
  86. Defines the root logger for this log context.
  87. </xs:documentation>
  88. </xs:annotation>
  89. <xs:all minOccurs="1" maxOccurs="1">
  90. <xs:element name="level" type="refType" minOccurs="0"/>
  91. <xs:element name="filter" type="filterType" minOccurs="0"/>
  92. <xs:element name="handlers" type="handlersType" minOccurs="0"/>
  93. </xs:all>
  94. </xs:complexType>
  95. <xs:complexType name="loggerType">
  96. <xs:annotation>
  97. <xs:documentation>
  98. Defines a logger category.
  99. </xs:documentation>
  100. </xs:annotation>
  101. <xs:complexContent>
  102. <xs:extension base="rootLoggerType">
  103. <xs:attribute name="use-parent-handlers" type="xs:boolean" use="optional" default="true"/>
  104. <xs:attribute name="category" type="xs:string" use="required"/>
  105. </xs:extension>
  106. </xs:complexContent>
  107. </xs:complexType>
  108. <xs:complexType name="consoleHandlerType">
  109. <xs:annotation>
  110. <xs:documentation>
  111. Defines a handler which writes to the console.
  112. </xs:documentation>
  113. </xs:annotation>
  114. <xs:all>
  115. <xs:element name="level" type="refType" minOccurs="0"/>
  116. <xs:element name="encoding" type="valueType" minOccurs="0"/>
  117. <xs:element name="filter" type="filterType" minOccurs="0"/>
  118. <xs:element name="formatter" type="formatterType" minOccurs="0"/>
  119. <xs:element name="target" minOccurs="0">
  120. <xs:complexType>
  121. <xs:attribute name="name" use="required">
  122. <xs:simpleType>
  123. <xs:restriction base="xs:token">
  124. <xs:enumeration value="System.out"/>
  125. <xs:enumeration value="System.err"/>
  126. </xs:restriction>
  127. </xs:simpleType>
  128. </xs:attribute>
  129. </xs:complexType>
  130. </xs:element>
  131. </xs:all>
  132. <xs:attribute name="autoflush" type="xs:boolean" use="optional" default="true"/>
  133. <xs:attribute name="name" type="xs:string" use="required"/>
  134. </xs:complexType>
  135. <xs:complexType name="fileHandlerType">
  136. <xs:annotation>
  137. <xs:documentation>
  138. Defines a handler which writes to a file.
  139. </xs:documentation>
  140. </xs:annotation>
  141. <xs:all>
  142. <xs:element name="level" type="refType" minOccurs="0"/>
  143. <xs:element name="encoding" type="valueType" minOccurs="0"/>
  144. <xs:element name="filter" type="filterType" minOccurs="0"/>
  145. <xs:element name="formatter" type="formatterType" minOccurs="0"/>
  146. <xs:element name="file" type="pathType" minOccurs="1"/>
  147. <xs:element name="append" type="booleanValueType" minOccurs="0"/>
  148. </xs:all>
  149. <xs:attribute name="autoflush" type="xs:boolean" use="optional" default="true"/>
  150. <xs:attribute name="name" type="xs:string" use="required"/>
  151. </xs:complexType>
  152. <xs:complexType name="periodicFileHandlerType">
  153. <xs:annotation>
  154. <xs:documentation>
  155. Defines a handler which writes to a file, rotating the log after a time period derived from the given
  156. suffix string, which should be in a format understood by java.text.SimpleDateFormat.
  157. </xs:documentation>
  158. </xs:annotation>
  159. <xs:all>
  160. <xs:element name="level" type="refType" minOccurs="0"/>
  161. <xs:element name="encoding" type="valueType" minOccurs="0"/>
  162. <xs:element name="filter" type="filterType" minOccurs="0"/>
  163. <xs:element name="formatter" type="formatterType" minOccurs="0"/>
  164. <xs:element name="file" type="pathType"/>
  165. <xs:element name="suffix" type="valueType"/>
  166. <xs:element name="append" type="booleanValueType" minOccurs="0"/>
  167. </xs:all>
  168. <xs:attribute name="autoflush" type="xs:boolean" use="optional" default="true"/>
  169. <xs:attribute name="name" type="xs:string" use="required"/>
  170. </xs:complexType>
  171. <xs:complexType name="sizeFileHandlerType">
  172. <xs:annotation>
  173. <xs:documentation>
  174. Defines a handler which writes to a file, rotating the log after a the size of the file grows beyond a
  175. certain point and keeping a fixed number of backups.
  176. </xs:documentation>
  177. </xs:annotation>
  178. <xs:all>
  179. <xs:element name="level" type="refType" minOccurs="0"/>
  180. <xs:element name="encoding" type="valueType" minOccurs="0"/>
  181. <xs:element name="filter" type="filterType" minOccurs="0"/>
  182. <xs:element name="formatter" type="formatterType" minOccurs="0"/>
  183. <xs:element name="file" type="pathType"/>
  184. <xs:element name="rotate-size" type="sizeType" minOccurs="0"/>
  185. <xs:element name="max-backup-index" type="positiveIntType" minOccurs="0"/>
  186. <xs:element name="append" type="booleanValueType" minOccurs="0"/>
  187. </xs:all>
  188. <xs:attribute name="autoflush" type="xs:boolean" use="optional" default="true"/>
  189. <xs:attribute name="name" type="xs:string" use="required"/>
  190. </xs:complexType>
  191. <xs:complexType name="asyncHandlerType">
  192. <xs:annotation>
  193. <xs:documentation>
  194. Defines a handler which writes to the sub-handlers in an asynchronous thread. Used for handlers which
  195. introduce a substantial amount of lag.
  196. </xs:documentation>
  197. </xs:annotation>
  198. <xs:all>
  199. <xs:element name="level" type="refType" minOccurs="0"/>
  200. <xs:element name="filter" type="filterType" minOccurs="0"/>
  201. <xs:element name="queue-length" type="queueLengthType" minOccurs="1" maxOccurs="1"/>
  202. <xs:element name="overflow-action" type="overflowActionType" minOccurs="0"/>
  203. <xs:element name="subhandlers" type="handlersType"/>
  204. </xs:all>
  205. <xs:attribute name="name" type="xs:string" use="required"/>
  206. </xs:complexType>
  207. <xs:complexType name="customHandlerType">
  208. <xs:annotation>
  209. <xs:documentation>
  210. Defines a custom handler.
  211. </xs:documentation>
  212. </xs:annotation>
  213. <xs:all>
  214. <xs:element name="level" type="refType" minOccurs="0"/>
  215. <xs:element name="encoding" type="valueType" minOccurs="0"/>
  216. <xs:element name="filter" type="filterType" minOccurs="0"/>
  217. <xs:element name="formatter" type="formatterType" minOccurs="0"/>
  218. <xs:element name="properties" type="propertiesType" minOccurs="0"/>
  219. </xs:all>
  220. <xs:attribute name="name" type="xs:string" use="required"/>
  221. <xs:attribute name="module" type="xs:string" use="required"/>
  222. <xs:attribute name="class" type="xs:string" use="required"/>
  223. </xs:complexType>
  224. <xs:complexType name="queueLengthType">
  225. <xs:attribute name="value" use="required">
  226. <xs:simpleType>
  227. <xs:restriction base="xs:positiveInteger">
  228. <xs:minExclusive value="1"/>
  229. </xs:restriction>
  230. </xs:simpleType>
  231. </xs:attribute>
  232. </xs:complexType>
  233. <xs:complexType name="overflowActionType">
  234. <xs:attribute name="value" use="required">
  235. <xs:simpleType>
  236. <xs:restriction base="xs:token">
  237. <xs:enumeration value="block"/>
  238. <xs:enumeration value="discard"/>
  239. </xs:restriction>
  240. </xs:simpleType>
  241. </xs:attribute>
  242. </xs:complexType>
  243. <xs:complexType name="positiveIntType">
  244. <xs:attribute name="value" use="required" type="xs:positiveInteger"/>
  245. </xs:complexType>
  246. <xs:complexType name="booleanValueType">
  247. <xs:attribute name="value" use="required" type="xs:boolean"/>
  248. </xs:complexType>
  249. <xs:complexType name="valueType">
  250. <xs:attribute name="value" use="required" type="xs:string"/>
  251. </xs:complexType>
  252. <xs:complexType name="pathType">
  253. <xs:attribute name="relative-to" use="optional" type="xs:string"/>
  254. <xs:attribute name="path" use="required" type="xs:string"/>
  255. </xs:complexType>
  256. <xs:complexType name="sizeType">
  257. <xs:attribute name="value">
  258. <xs:simpleType>
  259. <xs:restriction base="xs:string">
  260. <!-- XSD doesn't allow ^ or $ so ^[0-9]+[bkmgtp]?$ is invalid -->
  261. <xs:pattern value="[0-9]+[bkmgtp]"/>
  262. </xs:restriction>
  263. </xs:simpleType>
  264. </xs:attribute>
  265. </xs:complexType>
  266. <xs:complexType name="filterType">
  267. <xs:annotation>
  268. <xs:documentation>
  269. Defines a simple filter type.
  270. </xs:documentation>
  271. </xs:annotation>
  272. <xs:group ref="simpleFilterGroup"/>
  273. </xs:complexType>
  274. <xs:complexType name="multiFilterType">
  275. <xs:annotation>
  276. <xs:documentation>
  277. Defines a composite filter type. The "any" filter will return true of any of its constituent filters
  278. returns true; the "all" filter will return false if any of its constituent filters returns false. Both
  279. composite filter types are short-circuiting, meaning that if the result can be determined with an earlier
  280. filter, later filters are not run.
  281. </xs:documentation>
  282. </xs:annotation>
  283. <xs:group ref="simpleFilterGroup" maxOccurs="unbounded"/>
  284. </xs:complexType>
  285. <xs:group name="simpleFilterGroup">
  286. <xs:choice>
  287. <xs:element name="all" type="multiFilterType"/>
  288. <xs:element name="any" type="multiFilterType"/>
  289. <xs:element name="accept"/>
  290. <xs:element name="deny"/>
  291. <xs:element name="not" type="filterType"/>
  292. <xs:element name="match" type="regexFilterType"/>
  293. <xs:element name="replace" type="replaceFilterType"/>
  294. <xs:element name="level" type="levelFilterType"/>
  295. <xs:element name="level-range" type="levelRangeFilterType"/>
  296. <xs:element name="change-level" type="levelChangeFilterType"/>
  297. </xs:choice>
  298. </xs:group>
  299. <xs:complexType name="regexFilterType">
  300. <xs:annotation>
  301. <xs:documentation>
  302. A regular expression-based filter. The filter returns true if the pattern matches.
  303. </xs:documentation>
  304. </xs:annotation>
  305. <xs:attribute name="pattern" type="xs:string" use="required"/>
  306. </xs:complexType>
  307. <xs:complexType name="replaceFilterType">
  308. <xs:annotation>
  309. <xs:documentation>
  310. A regular expression substitution filter. This filter modifies the log message and always returns true.
  311. </xs:documentation>
  312. </xs:annotation>
  313. <xs:attribute name="pattern" type="xs:string" use="required"/>
  314. <xs:attribute name="replacement" type="xs:string" use="required"/>
  315. <xs:attribute name="replace-all" type="xs:boolean" default="true"/>
  316. </xs:complexType>
  317. <xs:complexType name="levelFilterType">
  318. <xs:annotation>
  319. <xs:documentation>
  320. A level filter. This filter returns true if the log message level matches the parameter. It is a
  321. numerical match; two differently-named levels with the same numeric value will be considered equal.
  322. </xs:documentation>
  323. </xs:annotation>
  324. <xs:attribute name="name" type="xs:string" use="required"/>
  325. </xs:complexType>
  326. <xs:complexType name="levelRangeFilterType">
  327. <xs:annotation>
  328. <xs:documentation>
  329. A level range filter. This filter returns true if the log message level matches the range specified
  330. by the parameters. It is a
  331. numerical match; two differently-named levels with the same numeric value will be considered equal.
  332. </xs:documentation>
  333. </xs:annotation>
  334. <xs:attribute name="min-level" type="xs:string" use="required"/>
  335. <xs:attribute name="min-inclusive" type="xs:boolean" use="optional" default="true"/>
  336. <xs:attribute name="max-level" type="xs:string" use="required"/>
  337. <xs:attribute name="max-inclusive" type="xs:boolean" use="optional" default="true"/>
  338. </xs:complexType>
  339. <xs:complexType name="levelChangeFilterType">
  340. <xs:annotation>
  341. <xs:documentation>
  342. A level change filter. This filter modifies the log message and always returns true.
  343. </xs:documentation>
  344. </xs:annotation>
  345. <xs:attribute name="new-level" type="xs:string" use="required"/>
  346. </xs:complexType>
  347. <!-- Formatters -->
  348. <xs:complexType name="formatterType">
  349. <xs:annotation>
  350. <xs:documentation>
  351. Defines a formatter.
  352. </xs:documentation>
  353. </xs:annotation>
  354. <xs:choice minOccurs="1" maxOccurs="1">
  355. <xs:element name="pattern-formatter" type="patternFormatterType" maxOccurs="1"/>
  356. </xs:choice>
  357. </xs:complexType>
  358. <xs:complexType name="patternFormatterType">
  359. <xs:annotation>
  360. <xs:documentation>
  361. Defines a pattern formatter. See the documentation for org.jboss.logmanager.formatters.FormatStringParser
  362. for more information about the format string.
  363. </xs:documentation>
  364. </xs:annotation>
  365. <xs:attribute name="pattern" type="xs:string" use="required"/>
  366. </xs:complexType>
  367. </xs:schema>