No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0337.xml 30KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Event Logging over XMPP</title>
  10. <abstract>This specification provides a common framework for sending events to event logs over XMPP networks.</abstract>
  11. &LEGALNOTICE;
  12. <number>0337</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. <spec>XEP-0001</spec>
  20. </dependencies>
  21. <supersedes/>
  22. <supersededby/>
  23. <shortname>eventlogging</shortname>
  24. &peterwaher;
  25. <revision>
  26. <version>0.3</version>
  27. <date>2017-09-11</date>
  28. <initials>XEP Editor (jwi)</initials>
  29. <remark>Defer due to lack of activity.</remark>
  30. </revision>
  31. <revision>
  32. <version>0.2</version>
  33. <date>2015-11-09</date>
  34. <initials>pw</initials>
  35. <remark>
  36. <p>Updated contact information.</p>
  37. <p>Updated example JIDs to example.org</p>
  38. </remark>
  39. </revision>
  40. <revision>
  41. <version>0.1</version>
  42. <date>2014-01-08</date>
  43. <initials>psa</initials>
  44. <remark><p>Initial published version approved by the XMPP Council.</p></remark>
  45. </revision>
  46. <revision>
  47. <version>0.0.2</version>
  48. <date>2013-12-02</date>
  49. <initials>pw</initials>
  50. <remark>
  51. <p>Addressed pre-publication feedback from the XMPP Council.</p>
  52. </remark>
  53. </revision>
  54. <revision>
  55. <version>0.0.1</version>
  56. <date>2013-11-10</date>
  57. <initials>pw</initials>
  58. <remark>
  59. <p>First draft.</p>
  60. </remark>
  61. </revision>
  62. </header>
  63. <section1 topic='Introduction' anchor='intro'>
  64. <p>
  65. This XEP provides a common framework for sending events over an XMPP network. These events can then be logged in event logs or analyzed by network monitors
  66. to analyze the status or operation of the network and its participants.
  67. </p>
  68. <p>
  69. The basic principle behind interoperable event logging over XMPP is the definition of a common XML element defining the event. This payload is then sent in
  70. a normal message stanza (i.e. with <strong>type='normal'</strong>) to the recipient. The recipient in turn, if it understands the payload, can choose to store it in an event log, forward it or
  71. analyze it accordingly.
  72. </p>
  73. <p>
  74. There are various event log packages available, but none yet defined for XMPP or using a well-defined and known XML format. Therefore, this document defines
  75. such an XML format. This format is able to store <link url='https://tools.ietf.org/html/rfc5424'>Syslog</link> <note>
  76. RFC-5424: The Syslog Protocol &lt;<link url='https://tools.ietf.org/html/rfc5424'>https://tools.ietf.org/html/rfc5424</link>&gt;
  77. </note> compliant event information, even though the <link url='https://tools.ietf.org/html/rfc5424'>Syslog</link> event model has been somewhat extended.
  78. Also, in the use of the facility attribute, this XEP does not have the same restrictions compared to the <link url='https://tools.ietf.org/html/rfc5424'>Syslog</link> specification.
  79. </p>
  80. <p>
  81. This document does not restrict the use of event messages to directed message stanzas alone. It may be envisioned that some would like to publish event information through
  82. &xep0060; or other mechanisms. It is not in the scope of this document to specify such transports however, as it only deals with direct messages, but a brief list is provided
  83. in the <link url='#transportoptions'>Security Considerations</link> section.
  84. </p>
  85. </section1>
  86. <section1 topic='Glossary' anchor='glossary'>
  87. <p>The following table lists common terms and corresponding descriptions.</p>
  88. <dl>
  89. <di>
  90. <dt>Event</dt>
  91. <dd>A piece of information describing an event in time.</dd>
  92. </di>
  93. <di>
  94. <dt>Event ID</dt>
  95. <dd>An attribute providing a machine readable ID to the type of event in question without having to parse the message text itself.</dd>
  96. </di>
  97. <di>
  98. <dt>Event Level</dt>
  99. <dd>Provides an additional level on the previous classification (Minor, Medium, Major).</dd>
  100. </di>
  101. <di>
  102. <dt>Event Type</dt>
  103. <dd>Coarse classification of the event (Debug, Informational, Notice, Warning, Error, Critical, Alert, Emergency).</dd>
  104. </di>
  105. <di>
  106. <dt>Facility</dt>
  107. <dd>What type of device, server, application, etc., is sending the message. </dd>
  108. </di>
  109. <di>
  110. <dt>Message</dt>
  111. <dd>A (human readable) text message describing what has occurred.</dd>
  112. </di>
  113. <di>
  114. <dt>Module</dt>
  115. <dd>
  116. The module reporting the event. Larger software packages are often divided into modules. Keeping track of which modules report which events can be useful when
  117. analyzing system performance.
  118. </dd>
  119. </di>
  120. <di>
  121. <dt>Object</dt>
  122. <dd>The object to which the event message refers to, on which the current action is performed.</dd>
  123. </di>
  124. <di>
  125. <dt>Stack Trace</dt>
  126. <dd>
  127. Exact position in the code from which the event was reported or where the error occurred. Reporting it in a separate attribute unclutters the message, and removes the need
  128. to define custom tags.
  129. </dd>
  130. </di>
  131. <di>
  132. <dt>Subject</dt>
  133. <dd>The subject causing the event to take place or performing the action (for instance, user, process, etc.)</dd>
  134. </di>
  135. <di>
  136. <dt>Tag</dt>
  137. <dd>A custom tag or parameter attached to an event. Each tag has a name and a value and an optional data type.</dd>
  138. </di>
  139. <di>
  140. <dt>Timestamp</dt>
  141. <dd>When the event occurred.</dd>
  142. </di>
  143. </dl>
  144. </section1>
  145. <section1 topic='Use Cases' anchor='usecases'>
  146. <section2 topic='Sending a simple event message' anchor='simpleevent'>
  147. <p>
  148. The following example shows how to send a simple event using a normal message to an event log. Only two parameters are required:
  149. The timestamp of the message goes into the <strong>timestamp</strong> attribute, and the actual messages goes into a child element
  150. named <strong>message</strong>. This event will be treated as a <strong>Minor Informational</strong> event by the recipient.
  151. </p>
  152. <example caption='Simple event message'>
  153. <![CDATA[
  154. <message from='device@example.org/device' to='eventlog@example.org' type='normal' xml:lang='en'>
  155. <log xmlns='urn:xmpp:eventlog' timestamp='2013-11-10T15:52:23Z'>
  156. <message>Something happened.</message>
  157. </log>
  158. </message>]]>
  159. </example>
  160. </section2>
  161. <section2 topic='Sending a multi-line event message' anchor='multilinemessage'>
  162. <p>
  163. The following example shows how to send a multi-line event.
  164. </p>
  165. <example caption='Multi-line event message'>
  166. <![CDATA[
  167. <message from='device@example.org/device' to='eventlog@example.org' type='normal' xml:lang='en'>
  168. <log xmlns='urn:xmpp:eventlog' timestamp='2013-11-12T11:47:12Z'>
  169. <message>10 objects deleted:
  170. Object 1
  171. ...
  172. Object 10</message>
  173. </log>
  174. </message>]]>
  175. </example>
  176. </section2>
  177. <section2 topic='Specifying type and level' anchor='typelevel'>
  178. <p>
  179. The following example shows how an event message can be categorized with an event type and level.
  180. </p>
  181. <example caption='Specifying type and level'>
  182. <![CDATA[
  183. <message from='device@example.org/device' to='eventlog@example.org' type='normal' xml:lang='en'>
  184. <log xmlns='urn:xmpp:eventlog' timestamp='2013-11-10T15:54:55Z' type='Warning' level='Major'>
  185. <message>Low on memory.</message>
  186. </log>
  187. </message>]]>
  188. </example>
  189. </section2>
  190. <section2 topic='Specifying object and subject' anchor='objectsubject'>
  191. <p>
  192. The following example shows how an event message can be further enhanced by providing object and subject information.
  193. </p>
  194. <example caption='Specifying object and subject'>
  195. <![CDATA[
  196. <message from='device@example.org/device' to='eventlog@example.org' type='normal' xml:lang='en'>
  197. <log xmlns='urn:xmpp:eventlog' timestamp='2013-11-10T15:58:12Z' type='Informational' level='Major' object='Towel' subject='Arthur Dent'>
  198. <message>Object deleted.</message>
  199. </log>
  200. </message>]]>
  201. </example>
  202. </section2>
  203. <section2 topic='Specifying an event ID' anchor='eventids'>
  204. <p>
  205. The following example shows how to send an event message with an event ID that can be singled out later to be analyzed by administrators, for instance.
  206. </p>
  207. <example caption='Specifying an event ID'>
  208. <![CDATA[
  209. <message from='device@example.org/device' to='eventlog@example.org' type='normal' xml:lang='en'>
  210. <log xmlns='urn:xmpp:eventlog' id='LoginFailed' timestamp='2013-11-10T16:04:45Z' type='Warning' level='Minor' object='user1' subject='10.0.0.1'>
  211. <message>User attempted to login but provided incorrect password.</message>
  212. </log>
  213. </message>]]>
  214. </example>
  215. </section2>
  216. <section2 topic='Tagging events with custom information' anchor='tags'>
  217. <p>
  218. The following example shows how to tag an event using custom information in a way that is easy to interpret and process.
  219. </p>
  220. <example caption='Tagging events with custom information'>
  221. <![CDATA[
  222. <message from='device@example.org/device' to='eventlog@example.org' type='normal' xml:lang='en'>
  223. <log xmlns='urn:xmpp:eventlog' timestamp='2013-11-10T16:07:01Z' type='Informational' level='Minor'>
  224. <message>Current resources.</message>
  225. <tag name='RAM' value='1655709892' type='xs:long'/>
  226. <tag name='CPU' value='75.45' type='xs:double'/>
  227. <tag name='HardDrive' value='163208757248' type='xs:long'/>
  228. </log>
  229. </message>]]>
  230. </example>
  231. <p><strong>Note:</strong> Any <strong>tag</strong> elements must come after the <strong>message</strong> element.</p>
  232. </section2>
  233. <section2 topic='Specifying program module' anchor='modules'>
  234. <p>
  235. The following example shows how module information can be provided in events to more easily be able to single out information
  236. relating to the same application running on different machines.
  237. </p>
  238. <example caption='Specifying program module'>
  239. <![CDATA[
  240. <message from='device@example.org/device' to='eventlog@example.org' type='normal' xml:lang='en'>
  241. <log xmlns='urn:xmpp:eventlog' timestamp='2013-11-10T16:17:56Z' type='Error' level='Major' object='object1' subject='user1' module='application1'>
  242. <message>Something horrible happened.</message>
  243. </log>
  244. </message>]]>
  245. </example>
  246. </section2>
  247. <section2 topic='Sending debug information' anchor='debug'>
  248. <p>
  249. The following example shows how to send a debug message with a stack trace, module and custom information.
  250. </p>
  251. <example caption='Sending debug information'>
  252. <![CDATA[
  253. <message from='device@example.org/device' to='eventlog@example.org' type='normal' xml:lang='en'>
  254. <log xmlns='urn:xmpp:eventlog' timestamp='2013-11-10T16:12:25Z' type='Debug' level='Major' module='My new application' stackTrace='file1, line 1, ...'>
  255. <message>Something is rotten in the state of Denmark.</message>
  256. <tag name='a' value='1' type='xs:int'/>
  257. <tag name='b' value='10' type='xs:int'/>
  258. <tag name='s' value='Hello World!' type='xs:string'/>
  259. <stackTrace>File1, Line1, ...
  260. File2, Line2, ...
  261. ...</stackTrace>
  262. </log>
  263. </message>]]>
  264. </example>
  265. <p><strong>Note:</strong> Any <strong>stackTrace</strong> element must come after the <strong>message</strong> element and any <strong>tag</strong> elements.</p>
  266. </section2>
  267. <section2 topic='Sending multiple events' anchor='multipleevents'>
  268. <p>
  269. The following example shows how multiple events can be sent in a single message. The receiver should interpret this as two different events having been received.
  270. </p>
  271. <example caption='Sending multiple events'>
  272. <![CDATA[
  273. <message from='device@example.org/device' to='eventlog@example.org' type='normal' xml:lang='en'>
  274. <log xmlns='urn:xmpp:eventlog' timestamp='2013-11-10T15:52:23Z'>
  275. <message>Something happened.</message>
  276. </log>
  277. <log xmlns='urn:xmpp:eventlog' timestamp='2013-11-10T15:54:23Z'>
  278. <message>Something else happened.</message>
  279. </log>
  280. </message>]]>
  281. </example>
  282. </section2>
  283. </section1>
  284. <section1 topic='Determining Support' anchor='support'>
  285. <p>If an entity supports the reception of events as specified herein, it MUST advertise that fact by returning a feature of "urn:xmpp:eventlog" in response to &xep0030; information requests.</p>
  286. <example caption="Service discovery information request">
  287. <![CDATA[
  288. <iq type='get'
  289. from='device@example.org/device'
  290. to='eventlog@example.org'
  291. id='disco1'>
  292. <query xmlns='http://jabber.org/protocol/disco#info'/>
  293. </iq>]]>
  294. </example>
  295. <example caption="Service discovery information response">
  296. <![CDATA[
  297. <iq type='result'
  298. from='eventlog@example.org'
  299. to='device@example.org/device'
  300. id='disco1'>
  301. <query xmlns='http://jabber.org/protocol/disco#info'>
  302. ...
  303. <feature var='urn:xmpp:eventlog'/>
  304. ...
  305. </query>
  306. </iq>]]>
  307. </example>
  308. <p>
  309. In order for an application to determine whether an entity supports this protocol, where possible it SHOULD use the dynamic, presence-based profile of service discovery defined
  310. in &xep0115;. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.
  311. </p>
  312. </section1>
  313. <section1 topic='Implementation Notes' anchor='impl'>
  314. <section2 topic='Event Type' anchor='eventtype'>
  315. <p>
  316. The following table lists possible event types that can be used. If none is specified for an event, it is assumed that the event is <strong>Informational</strong>.
  317. It is largely based on the severity levels of <link url='https://tools.ietf.org/html/rfc5424'>Syslog</link>.
  318. </p>
  319. <table caption='Event Types'>
  320. <tr>
  321. <th>Type</th>
  322. <th>Description</th>
  323. </tr>
  324. <tr>
  325. <td>Debug</td>
  326. <td>Developers can ask applications to send debug messages during development or testing to more easily see what happens in a system.</td>
  327. </tr>
  328. <tr>
  329. <td>Informational</td>
  330. <td>An informational message describing a normal event.</td>
  331. </tr>
  332. <tr>
  333. <td>Notice</td>
  334. <td>Represents a significant condition or change that administrators should be aware of.</td>
  335. </tr>
  336. <tr>
  337. <td>Warning</td>
  338. <td>A warning condition. If not taken into account, the condition could turn into an error.</td>
  339. </tr>
  340. <tr>
  341. <td>Error</td>
  342. <td>An error condition. A condition has been detected that is considered to be an error or a fault.</td>
  343. </tr>
  344. <tr>
  345. <td>Critical</td>
  346. <td>A critical condition. An error so great that it could escalate into something graver if not addressed.</td>
  347. </tr>
  348. <tr>
  349. <td>Alert</td>
  350. <td>An alert condition. Action must be taken immediately.</td>
  351. </tr>
  352. <tr>
  353. <td>Emergency</td>
  354. <td>System is unusable.</td>
  355. </tr>
  356. </table>
  357. </section2>
  358. <section2 topic='Event Level' anchor='eventlevel'>
  359. <p>
  360. Given an Event Type, an event level can provide additional information about the extent or importance of the event (a second dimension).
  361. </p>
  362. <table caption='Event Levels'>
  363. <tr>
  364. <th>Level</th>
  365. <th>Description</th>
  366. </tr>
  367. <tr>
  368. <td>Minor</td>
  369. <td>Minor events, concerning normal operating procedures.</td>
  370. </tr>
  371. <tr>
  372. <td>Medium</td>
  373. <td>Medium events.</td>
  374. </tr>
  375. <tr>
  376. <td>Major</td>
  377. <td>More substantial events or events that are affecting larger parts of the system.</td>
  378. </tr>
  379. </table>
  380. </section2>
  381. <section2 topic='Event ID' anchor='eventid'>
  382. <p>
  383. Using Event IDs, the application can provide a machine understandable classification of the event. Examples could be "Login"-events, "ConnectionProblem"-events, etc.
  384. It is easier to group, parse or interpret events and their tags if you know what type of event it is. Event IDs are manufacturer specific, and only provide a means
  385. to more easily extract subsets of events for processing without having to parse message texts (which should be allowed to be localizable).
  386. </p>
  387. <p>
  388. <strong>Note:</strong> To avoid problems when running applications using different locales, event IDs should never be localized.
  389. </p>
  390. </section2>
  391. <section2 topic='Object' anchor='object'>
  392. <p>
  393. An event is often linked to an object, e.g. on which object an action was performed, or which object is reporting a condition. The object field permits
  394. the tagging of objects in a common way. It is later easy to extract all events relating to a specific object by using this attribute.
  395. </p>
  396. </section2>
  397. <section2 topic='Subject' anchor='subject'>
  398. <p>
  399. An event is often also linked to a subject, i.e. who or what performed a given action resulting in the event or condition. The subject field permits
  400. the tagging of subjects in a common way. It is later easy to extract all events relating to a specific subject by using this attribute.
  401. </p>
  402. </section2>
  403. <section2 topic='Facility' anchor='facility'>
  404. <p>
  405. Facility can be either a facility in the network sense or in the system sense. This document does not restrict its use to the possible choices defined by
  406. other protocols such as <link url='https://tools.ietf.org/html/rfc5424'>Syslog</link>, and leaves it open. However, it is left as a special attribute since
  407. it is important in monitoring applications.
  408. </p>
  409. </section2>
  410. <section2 topic='Module' anchor='module'>
  411. <p>
  412. A module is part of a larger software package. Using the module attribute makes it easier to attribute events to specific parts of a distributed
  413. application and analyze them separately.
  414. </p>
  415. </section2>
  416. <section2 topic='Stack Trace' anchor='stacktrace'>
  417. <p>
  418. Stack Traces can be important information to developers and correlate events to actual locations in the code that generated the event. This document
  419. does not specify any particular format for stack traces.
  420. </p>
  421. </section2>
  422. <section2 topic='Tag' anchor='tag'>
  423. <p>
  424. Any event can have a custom set of tags attached to it. A tag is required to have a name and a value. It can also optionally specify a data type.
  425. Data types are specified using Qualified Names (QNames). If possible, they should adhere to the list of
  426. <link url='http://xmpp.org/registrar/xdv-datatypes.html'>Data Forms Validation Datatypes</link> <note>
  427. Data Forms Validation Datatypes &lt;<link url='http://xmpp.org/registrar/xdv-datatypes.html'>http://xmpp.org/registrar/xdv-datatypes.html</link>&gt;
  428. </note> that is maintained by the XMPP Registrar.
  429. </p>
  430. <p>
  431. <strong>Note:</strong> To avoid problems when running applications using different locales, tag names should never be localized.
  432. </p>
  433. </section2>
  434. <section2 topic='Normalized tables' anchor='normalizedtables'>
  435. <p>
  436. If persisting received events in a database, care should be taken if normalized tables are used for storage of tags names and values, event IDs, objects, subjects,
  437. facilities and modules. If this is the case, the receiver should look for types of values that can be incompatible with normalized tables (such as floating point values or numbers
  438. in general, GUIDs, resource names in JIDs etc.) and replace them with some descriptive text and append the corresponding value in the message text instead. This to avoid problems with indexes in
  439. databases because of devices implemented by third parties.
  440. </p>
  441. <p>
  442. It is still valid to send information like sequence numbers, unique GUIDs, measurements, resource names in JIDs etc. in tag names and values, but such information
  443. should be avoided in event IDs, objects, subjects, facilities and modules, as they can cause problems further down the line.
  444. </p>
  445. </section2>
  446. <section2 topic='Multi-line messages and stack traces' anchor='multilinemessagesstacktraces'>
  447. <p>
  448. The messag text and stack trace parts of an event message lie as simple type valued child elements (xs:string). This allows for simple encoding of multi-line text
  449. information into these two parameters. However, do not indent new lines when serializing multi-line text to these parameters to make the XML look nicer. The recipient
  450. cannot know what whitespace is indenting and what is part of the actual information.
  451. </p>
  452. </section2>
  453. </section1>
  454. <section1 topic='Internationalization Considerations' anchor='i18n'>
  455. <section2 topic='Time Zones' anchor='timezones'>
  456. <p>
  457. All timestamps and dateTime values use the XML data type xs:dateTime to specify values. These values include a date, an optional time and an optional time zone.
  458. </p>
  459. <p>
  460. <strong>Note:</strong> If time zone is not available, it is supposed to be undefined. The recipient of an event message without time zone information
  461. should assume the sender has the same time zone as the received, if not explicitly configured otherwise on the recipient side.
  462. </p>
  463. <p>
  464. If devices report time zone, this information should be propagated throughout the system. Otherwise, comparing timestamps from different time zones will be impossible.
  465. </p>
  466. </section2>
  467. <section2 topic='xml:lang' anchor='lang'>
  468. <p>
  469. Event messages SHOULD contain an <strong>xml:lang</strong> attribute on the message stanza to specify the language
  470. used in message texts, etc. If language information is not available, e.g. if relaying messages are not created by the device itself,
  471. the <strong>xml:lang</strong> attribute can be omitted.
  472. </p>
  473. </section2>
  474. </section1>
  475. <section1 topic='Security Considerations' anchor='security'>
  476. <section2 topic='Zero configuration' anchor='zeroconf'>
  477. <p>
  478. Even though this document permits zero-configuration of devices to event logs, this might not always be the best option. Event information might be sensitive
  479. and should not be sent to anybody just because they support the event log feature as defined in this document.
  480. </p>
  481. </section2>
  482. <section2 topic='Sensitive information' anchor='sensitiveinfo'>
  483. <p>
  484. <strong>Never</strong> log information that should be handled securely or encrypted, such as passwords.
  485. </p>
  486. </section2>
  487. <section2 topic='Transport options' anchor='transportoptions'>
  488. <p>
  489. The following subsections lists different transport options together with security considerations for each one.
  490. </p>
  491. <section3 topic='Direct messages'>
  492. <p>
  493. This document explicitly describes how to send event messages in direct messages. If sensitive information is being sent,
  494. end-to-end encryption should be considered.
  495. </p>
  496. </section3>
  497. <section3 topic='Publish/Subscribe'>
  498. <p>
  499. Event messages could be published using <link url='http://xmpp.org/extensions/xep-0060.html'>Publish-Subscribe</link>. But, even more care should
  500. be taken to log only information that can be published openly. If there's risk for sensitive information to be logged, the publish/subscribe pattern
  501. should be avoided.
  502. </p>
  503. </section3>
  504. </section2>
  505. </section1>
  506. <section1 topic='IANA Considerations' anchor='iana'>
  507. <p>This document requires no interaction with &IANA;.</p>
  508. </section1>
  509. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  510. <p>
  511. The <link url="#schema">protocol schema</link> needs to be added to the list of <link url="http://xmpp.org/resources/schemas/">XMPP protocol schemas</link>.
  512. </p>
  513. </section1>
  514. <section1 topic='XML Schema' anchor='schema'>
  515. <code>
  516. <![CDATA[
  517. <?xml version='1.0' encoding='UTF-8'?>
  518. <xs:schema
  519. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  520. targetNamespace='urn:xmpp:eventlog'
  521. xmlns='urn:xmpp:eventlog'
  522. elementFormDefault='qualified'>
  523. <xs:element name='log'>
  524. <xs:complexType>
  525. <xs:sequence>
  526. <xs:element name='message' type='xs:string' minOccurs='1' maxOccurs='1'/>
  527. <xs:element name='tag' minOccurs='0' maxOccurs='unbounded'>
  528. <xs:complexType>
  529. <xs:attribute name='name' type='xs:string' use='required'/>
  530. <xs:attribute name='value' type='xs:string' use='required'/>
  531. <xs:attribute name='type' type='xs:QName' use='optional' default='xs:string'/>
  532. </xs:complexType>
  533. </xs:element>
  534. <xs:element name='stackTrace' type='xs:string' minOccurs='0' maxOccurs='1'/>
  535. </xs:sequence>
  536. <xs:attribute name='timestamp' type='xs:dateTime' use='required'/>
  537. <xs:attribute name='id' type='xs:string' use='optional'/>
  538. <xs:attribute name='type' type='EventType' use='optional' default='Informational'/>
  539. <xs:attribute name='level' type='EventLevel' use='optional' default='Minor'/>
  540. <xs:attribute name='object' type='xs:string' use='optional'/>
  541. <xs:attribute name='subject' type='xs:string' use='optional'/>
  542. <xs:attribute name='facility' type='xs:string' use='optional'/>
  543. <xs:attribute name='module' type='xs:string' use='optional'/>
  544. </xs:complexType>
  545. </xs:element>
  546. <xs:simpleType name='EventType'>
  547. <xs:restriction base='xs:string'>
  548. <xs:enumeration value='Debug'/>
  549. <xs:enumeration value='Informational'/>
  550. <xs:enumeration value='Notice'/>
  551. <xs:enumeration value='Warning'/>
  552. <xs:enumeration value='Error'/>
  553. <xs:enumeration value='Critical'/>
  554. <xs:enumeration value='Alert'/>
  555. <xs:enumeration value='Emergency'/>
  556. </xs:restriction>
  557. </xs:simpleType>
  558. <xs:simpleType name='EventLevel'>
  559. <xs:restriction base='xs:string'>
  560. <xs:enumeration value='Major'/>
  561. <xs:enumeration value='Medium'/>
  562. <xs:enumeration value='Minor'/>
  563. </xs:restriction>
  564. </xs:simpleType>
  565. </xs:schema>]]>
  566. </code>
  567. </section1>
  568. <section1 topic='Acknowledgements' anchor='ack'>
  569. <p>Thanks in alphabetical order to Dave Cridland, Joachim Lindborg, Karin Forsell, Ludovic Bocquet, Markus Kohlhase, Matthew Wild, Mike Taylor, Philipp Hancke, Robert Kosten, Steffen Larsen, and Yusuke DOI for all valuable feedback.</p>
  570. </section1>
  571. </xep>