jboss-as-logging_1_2.xsd 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ JBoss, Home of Professional Open Source.
  4. ~ Copyright 2012, 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.2"
  25. xmlns="urn:jboss:domain:logging:1.2"
  26. elementFormDefault="qualified"
  27. attributeFormDefault="unqualified"
  28. version="1.2">
  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:element name="syslog-handler" type="syslogHandlerType"/>
  49. <xs:element name="logging-profiles" type="logging-profilesType" minOccurs="0" maxOccurs="1"/>
  50. </xs:choice>
  51. </xs:complexType>
  52. <xs:complexType name="logging-profilesType">
  53. <xs:annotation>
  54. <xs:documentation>
  55. Contains a list of profiles available for use in deployments
  56. </xs:documentation>
  57. </xs:annotation>
  58. <xs:sequence>
  59. <xs:element name="logging-profile" type="logging-profileType" minOccurs="0" maxOccurs="unbounded"/>
  60. </xs:sequence>
  61. </xs:complexType>
  62. <xs:complexType name="logging-profileType">
  63. <xs:annotation>
  64. <xs:documentation>
  65. A logging profile that can be used in a deployment for a custom logging configuration.
  66. </xs:documentation>
  67. </xs:annotation>
  68. <xs:choice minOccurs="0" maxOccurs="unbounded">
  69. <xs:element name="logger" type="loggerType"/>
  70. <xs:element name="root-logger" type="rootLoggerType"/>
  71. <xs:element name="console-handler" type="consoleHandlerType"/>
  72. <xs:element name="file-handler" type="fileHandlerType"/>
  73. <xs:element name="periodic-rotating-file-handler" type="periodicFileHandlerType"/>
  74. <xs:element name="size-rotating-file-handler" type="sizeFileHandlerType"/>
  75. <xs:element name="async-handler" type="asyncHandlerType"/>
  76. <xs:element name="custom-handler" type="customHandlerType"/>
  77. <xs:element name="syslog-handler" type="syslogHandlerType"/>
  78. </xs:choice>
  79. <xs:attribute name="name" type="xs:string" use="required"/>
  80. </xs:complexType>
  81. <xs:complexType name="propertiesType">
  82. <xs:annotation>
  83. <xs:documentation>
  84. A collection of free-form properties.
  85. </xs:documentation>
  86. </xs:annotation>
  87. <xs:choice minOccurs="0" maxOccurs="unbounded">
  88. <xs:element name="property">
  89. <xs:complexType>
  90. <xs:attribute name="name" type="xs:string" use="required"/>
  91. <xs:attribute name="value" type="xs:string" use="optional"/>
  92. </xs:complexType>
  93. </xs:element>
  94. </xs:choice>
  95. </xs:complexType>
  96. <xs:complexType name="refType">
  97. <xs:annotation>
  98. <xs:documentation>
  99. A named reference to another object.
  100. </xs:documentation>
  101. </xs:annotation>
  102. <xs:attribute name="name" type="xs:string" use="required"/>
  103. </xs:complexType>
  104. <xs:complexType name="handlersType">
  105. <xs:annotation>
  106. <xs:documentation>
  107. A collection of handlers to apply to the enclosing object.
  108. </xs:documentation>
  109. </xs:annotation>
  110. <xs:choice minOccurs="0" maxOccurs="unbounded">
  111. <xs:element name="handler" type="refType"/>
  112. </xs:choice>
  113. </xs:complexType>
  114. <xs:complexType name="rootLoggerType">
  115. <xs:annotation>
  116. <xs:documentation>
  117. Defines the root logger for this log context.
  118. </xs:documentation>
  119. </xs:annotation>
  120. <xs:all minOccurs="1" maxOccurs="1">
  121. <xs:element name="level" type="refType" minOccurs="0"/>
  122. <xs:element name="filter-spec" type="valueType" minOccurs="0"/>
  123. <xs:element name="handlers" type="handlersType" minOccurs="0"/>
  124. </xs:all>
  125. </xs:complexType>
  126. <xs:complexType name="loggerType">
  127. <xs:annotation>
  128. <xs:documentation>
  129. Defines a logger category.
  130. </xs:documentation>
  131. </xs:annotation>
  132. <xs:complexContent>
  133. <xs:extension base="rootLoggerType">
  134. <xs:attribute name="use-parent-handlers" type="xs:boolean" use="optional" default="true"/>
  135. <xs:attribute name="category" type="xs:string" use="required"/>
  136. </xs:extension>
  137. </xs:complexContent>
  138. </xs:complexType>
  139. <xs:complexType name="consoleHandlerType">
  140. <xs:annotation>
  141. <xs:documentation>
  142. Defines a handler which writes to the console.
  143. </xs:documentation>
  144. </xs:annotation>
  145. <xs:all>
  146. <xs:element name="level" type="refType" minOccurs="0"/>
  147. <xs:element name="encoding" type="valueType" minOccurs="0"/>
  148. <xs:element name="filter-spec" type="valueType" minOccurs="0"/>
  149. <xs:element name="filter" type="valueType" minOccurs="0"/>
  150. <xs:element name="formatter" type="formatterType" minOccurs="0"/>
  151. <xs:element name="target" minOccurs="0">
  152. <xs:complexType>
  153. <xs:attribute name="name" use="required">
  154. <xs:simpleType>
  155. <xs:restriction base="xs:token">
  156. <xs:enumeration value="System.out"/>
  157. <xs:enumeration value="System.err"/>
  158. </xs:restriction>
  159. </xs:simpleType>
  160. </xs:attribute>
  161. </xs:complexType>
  162. </xs:element>
  163. </xs:all>
  164. <xs:attribute name="autoflush" type="xs:boolean" use="optional" default="true"/>
  165. <xs:attribute name="name" type="xs:string" use="required"/>
  166. <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
  167. </xs:complexType>
  168. <xs:complexType name="fileHandlerType">
  169. <xs:annotation>
  170. <xs:documentation>
  171. Defines a handler which writes to a file.
  172. </xs:documentation>
  173. </xs:annotation>
  174. <xs:all>
  175. <xs:element name="level" type="refType" minOccurs="0"/>
  176. <xs:element name="encoding" type="valueType" minOccurs="0"/>
  177. <xs:element name="filter-spec" type="valueType" minOccurs="0"/>
  178. <xs:element name="formatter" type="formatterType" minOccurs="0"/>
  179. <xs:element name="file" type="pathType" minOccurs="1"/>
  180. <xs:element name="append" type="booleanValueType" minOccurs="0"/>
  181. </xs:all>
  182. <xs:attribute name="autoflush" type="xs:boolean" use="optional" default="true"/>
  183. <xs:attribute name="name" type="xs:string" use="required"/>
  184. <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
  185. </xs:complexType>
  186. <xs:complexType name="periodicFileHandlerType">
  187. <xs:annotation>
  188. <xs:documentation>
  189. Defines a handler which writes to a file, rotating the log after a time period derived from the given
  190. suffix string, which should be in a format understood by java.text.SimpleDateFormat.
  191. </xs:documentation>
  192. </xs:annotation>
  193. <xs:all>
  194. <xs:element name="level" type="refType" minOccurs="0"/>
  195. <xs:element name="encoding" type="valueType" minOccurs="0"/>
  196. <xs:element name="filter-spec" type="valueType" minOccurs="0"/>
  197. <xs:element name="formatter" type="formatterType" minOccurs="0"/>
  198. <xs:element name="file" type="pathType"/>
  199. <xs:element name="suffix" type="valueType"/>
  200. <xs:element name="append" type="booleanValueType" minOccurs="0"/>
  201. </xs:all>
  202. <xs:attribute name="autoflush" type="xs:boolean" use="optional" default="true"/>
  203. <xs:attribute name="name" type="xs:string" use="required"/>
  204. <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
  205. </xs:complexType>
  206. <xs:complexType name="sizeFileHandlerType">
  207. <xs:annotation>
  208. <xs:documentation>
  209. Defines a handler which writes to a file, rotating the log after a the size of the file grows beyond a
  210. certain point and keeping a fixed number of backups.
  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-spec" type="valueType" minOccurs="0"/>
  217. <xs:element name="formatter" type="formatterType" minOccurs="0"/>
  218. <xs:element name="file" type="pathType"/>
  219. <xs:element name="rotate-size" type="sizeType" minOccurs="0"/>
  220. <xs:element name="max-backup-index" type="positiveIntType" minOccurs="0"/>
  221. <xs:element name="append" type="booleanValueType" minOccurs="0"/>
  222. </xs:all>
  223. <xs:attribute name="autoflush" type="xs:boolean" use="optional" default="true"/>
  224. <xs:attribute name="name" type="xs:string" use="required"/>
  225. <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
  226. </xs:complexType>
  227. <xs:complexType name="asyncHandlerType">
  228. <xs:annotation>
  229. <xs:documentation>
  230. Defines a handler which writes to the sub-handlers in an asynchronous thread. Used for handlers which
  231. introduce a substantial amount of lag.
  232. </xs:documentation>
  233. </xs:annotation>
  234. <xs:all>
  235. <xs:element name="level" type="refType" minOccurs="0"/>
  236. <xs:element name="filter-spec" type="valueType" minOccurs="0"/>
  237. <xs:element name="queue-length" type="queueLengthType" minOccurs="1" maxOccurs="1"/>
  238. <xs:element name="overflow-action" type="overflowActionType" minOccurs="0"/>
  239. <xs:element name="subhandlers" type="handlersType"/>
  240. </xs:all>
  241. <xs:attribute name="name" type="xs:string" use="required"/>
  242. <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
  243. </xs:complexType>
  244. <xs:complexType name="customHandlerType">
  245. <xs:annotation>
  246. <xs:documentation>
  247. Defines a custom handler.
  248. </xs:documentation>
  249. </xs:annotation>
  250. <xs:all>
  251. <xs:element name="level" type="refType" minOccurs="0"/>
  252. <xs:element name="encoding" type="valueType" minOccurs="0"/>
  253. <xs:element name="filter-spec" type="valueType" minOccurs="0"/>
  254. <xs:element name="formatter" type="formatterType" minOccurs="0"/>
  255. <xs:element name="properties" type="propertiesType" minOccurs="0"/>
  256. </xs:all>
  257. <xs:attribute name="name" type="xs:string" use="required"/>
  258. <xs:attribute name="module" type="xs:string" use="required"/>
  259. <xs:attribute name="class" type="xs:string" use="required"/>
  260. <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
  261. </xs:complexType>
  262. <xs:complexType name="syslogHandlerType">
  263. <xs:annotation>
  264. <xs:documentation>
  265. Defines a syslog handler for UNIX/Linux based operating systems.
  266. </xs:documentation>
  267. </xs:annotation>
  268. <xs:all>
  269. <xs:element name="level" type="refType" minOccurs="0"/>
  270. <xs:element name="server-address" type="valueType" minOccurs="0" maxOccurs="1">
  271. <xs:annotation>
  272. <xs:documentation>
  273. The address of the syslog server. The default is localhost.
  274. </xs:documentation>
  275. </xs:annotation>
  276. </xs:element>
  277. <xs:element name="hostname" type="valueType" minOccurs="0" maxOccurs="1">
  278. <xs:annotation>
  279. <xs:documentation>
  280. The name of the host the messages are being sent from. For example the name of the host the
  281. application server is running on.
  282. </xs:documentation>
  283. </xs:annotation>
  284. </xs:element>
  285. <xs:element name="port" type="positiveIntType" minOccurs="0" maxOccurs="1">
  286. <xs:annotation>
  287. <xs:documentation>
  288. The port the syslog server is listening on. The default is 514.
  289. </xs:documentation>
  290. </xs:annotation>
  291. </xs:element>
  292. <xs:element name="app-name" type="valueType" minOccurs="0" maxOccurs="1">
  293. <xs:annotation>
  294. <xs:documentation>
  295. The app name used when formatting the message in RFC5424 format. By default the app name is
  296. &quot;java&quot;
  297. </xs:documentation>
  298. </xs:annotation>
  299. </xs:element>
  300. <xs:element name="formatter" type="syslogFormatterType" minOccurs="0" maxOccurs="1"/>
  301. <xs:element name="facility" type="facilityType" minOccurs="0" maxOccurs="1"/>
  302. </xs:all>
  303. <xs:attribute name="name" type="xs:string" use="required"/>
  304. <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
  305. </xs:complexType>
  306. <xs:complexType name="queueLengthType">
  307. <xs:attribute name="value" use="required">
  308. <xs:simpleType>
  309. <xs:restriction base="xs:positiveInteger">
  310. <xs:minExclusive value="1"/>
  311. </xs:restriction>
  312. </xs:simpleType>
  313. </xs:attribute>
  314. </xs:complexType>
  315. <xs:complexType name="overflowActionType">
  316. <xs:attribute name="value" use="required">
  317. <xs:simpleType>
  318. <xs:restriction base="xs:token">
  319. <xs:enumeration value="block"/>
  320. <xs:enumeration value="discard"/>
  321. </xs:restriction>
  322. </xs:simpleType>
  323. </xs:attribute>
  324. </xs:complexType>
  325. <xs:complexType name="positiveIntType">
  326. <xs:attribute name="value" use="required" type="xs:positiveInteger"/>
  327. </xs:complexType>
  328. <xs:complexType name="booleanValueType">
  329. <xs:attribute name="value" use="required" type="xs:boolean"/>
  330. </xs:complexType>
  331. <xs:complexType name="valueType">
  332. <xs:attribute name="value" use="required" type="xs:string"/>
  333. </xs:complexType>
  334. <xs:complexType name="pathType">
  335. <xs:attribute name="relative-to" use="optional" type="xs:string"/>
  336. <xs:attribute name="path" use="required" type="xs:string"/>
  337. </xs:complexType>
  338. <xs:complexType name="sizeType">
  339. <xs:attribute name="value">
  340. <xs:simpleType>
  341. <xs:restriction base="xs:string">
  342. <!-- XSD doesn't allow ^ or $ so ^[0-9]+[bkmgtp]?$ is invalid -->
  343. <xs:pattern value="[0-9]+[bkmgtp]"/>
  344. </xs:restriction>
  345. </xs:simpleType>
  346. </xs:attribute>
  347. </xs:complexType>
  348. <xs:complexType name="facilityType">
  349. <xs:annotation>
  350. <xs:documentation>
  351. Facility as defined by RFC-5424 (http://tools.ietf.org/html/rfc5424)and RFC-3164
  352. (http://tools.ietf.org/html/rfc3164).
  353. </xs:documentation>
  354. </xs:annotation>
  355. <xs:attribute name="value" use="required">
  356. <xs:simpleType>
  357. <xs:restriction base="xs:token">
  358. <xs:enumeration value="kernel"/>
  359. <xs:enumeration value="user-level"/>
  360. <xs:enumeration value="mail-system"/>
  361. <xs:enumeration value="system-daemons"/>
  362. <xs:enumeration value="security"/>
  363. <xs:enumeration value="syslogd"/>
  364. <xs:enumeration value="line-printer"/>
  365. <xs:enumeration value="network-news"/>
  366. <xs:enumeration value="uucp"/>
  367. <xs:enumeration value="clock-daemon"/>
  368. <xs:enumeration value="security2"/>
  369. <xs:enumeration value="ftp-daemon"/>
  370. <xs:enumeration value="ntp"/>
  371. <xs:enumeration value="log-audit"/>
  372. <xs:enumeration value="log-alert"/>
  373. <xs:enumeration value="clock-daemon2"/>
  374. <xs:enumeration value="local-use-0"/>
  375. <xs:enumeration value="local-use-1"/>
  376. <xs:enumeration value="local-use-2"/>
  377. <xs:enumeration value="local-use-3"/>
  378. <xs:enumeration value="local-use-4"/>
  379. <xs:enumeration value="local-use-5"/>
  380. <xs:enumeration value="local-use-6"/>
  381. <xs:enumeration value="local-use-7"/>
  382. </xs:restriction>
  383. </xs:simpleType>
  384. </xs:attribute>
  385. </xs:complexType>
  386. <!-- Formatters -->
  387. <xs:complexType name="formatterType">
  388. <xs:annotation>
  389. <xs:documentation>
  390. Defines a formatter.
  391. </xs:documentation>
  392. </xs:annotation>
  393. <xs:choice minOccurs="1" maxOccurs="1">
  394. <xs:element name="pattern-formatter" type="patternFormatterType" maxOccurs="1"/>
  395. </xs:choice>
  396. </xs:complexType>
  397. <xs:complexType name="patternFormatterType">
  398. <xs:annotation>
  399. <xs:documentation>
  400. Defines a pattern formatter. See the documentation for org.jboss.logmanager.formatters.FormatStringParser
  401. for more information about the format string.
  402. </xs:documentation>
  403. </xs:annotation>
  404. <xs:attribute name="pattern" type="xs:string" use="required"/>
  405. </xs:complexType>
  406. <xs:complexType name="syslogFormatterType">
  407. <xs:annotation>
  408. <xs:documentation>
  409. Defines a formatter.
  410. </xs:documentation>
  411. </xs:annotation>
  412. <xs:choice minOccurs="1" maxOccurs="1">
  413. <xs:element name="syslog-format" type="syslogFormatType" maxOccurs="1"/>
  414. </xs:choice>
  415. </xs:complexType>
  416. <xs:complexType name="syslogFormatType">
  417. <xs:annotation>
  418. <xs:documentation>
  419. Formats the log message according to the RFC specification.
  420. </xs:documentation>
  421. </xs:annotation>
  422. <xs:attribute name="syslog-type" use="required">
  423. <xs:simpleType>
  424. <xs:restriction base="xs:token">
  425. <xs:enumeration value="RFC5424">
  426. <xs:annotation>
  427. <xs:documentation>
  428. Formats the message according the the RFC-5424 specification
  429. (http://tools.ietf.org/html/rfc5424#section-6)
  430. </xs:documentation>
  431. </xs:annotation>
  432. </xs:enumeration>
  433. <xs:enumeration value="RFC3164">
  434. <xs:annotation>
  435. <xs:documentation>
  436. Formats the message according the the RFC-3164 specification
  437. (http://tools.ietf.org/html/rfc3164#section-4.1)
  438. </xs:documentation>
  439. </xs:annotation>
  440. </xs:enumeration>
  441. </xs:restriction>
  442. </xs:simpleType>
  443. </xs:attribute>
  444. </xs:complexType>
  445. </xs:schema>