logdistiller-1_4.dtd: Elements - Entities - Source | Intro - Index
FRAMES / NO FRAMES

<?xml version="1.0" encoding="UTF-8" ?>

<!--
LogDistiller's classification rules root element.
@title LogDistiller
@root
-->
<!ELEMENT logdistiller (property*, description, logtype, output, category*, group+)>
<!--
@attr id the identifier that will be used in reports
-->
<!ATTLIST logdistiller
  id ID #REQUIRED
>

<!--
A property definition. After its definition, property's value can be referenced in params, descriptions or matches with
<code>${<i>property-name</i>}</code> syntax.
The property value set in rules definition file can be overridden at runtime by <b>LogDistiller</b>'s Ant task through
equivalent <code>property</code> element.
@example %<property name="logs.subdir" value=""/>%
-->
<!ELEMENT property EMPTY>
<!--
@attr name name of the property
@attr value value of the property
-->
<!ATTLIST property
  name NMTOKENS #REQUIRED
  value CDATA #REQUIRED
>

<!--
Description of the corresponding element, which will be printed in reports, after property substitution:
<code>${<i>property-name</i>}</code> is replaced by property's value.
-->
<!ELEMENT description (#PCDATA)>

<!--
Logtype of the logs that will be <i>distilled</i>.
-->
<!ELEMENT logtype (param*, attributes?)>
<!ATTLIST logtype
  id ID #REQUIRED
>

<!--
A parameter definition, to customize its parent element. Parameter's value is read from element's content, after
property substitution: <code>${<i>property-name</i>}</code> is replaced by property's value.
-->
<!ELEMENT param (#PCDATA)>
<!--
@attr name name of the parameter. Available names vary depending on the usage context.
-->
<!ATTLIST param
  name NMTOKENS #REQUIRED
>

<!--
Attributes that will be available for log events.
-->
<!ELEMENT attributes (provided, extension*)>

<!--
Attributes directly provided by the log type.
-->
<!ELEMENT provided (#PCDATA)>

<!--
Attributes calculated with a regexp on log type provided one.
-->
<!ELEMENT extension (#PCDATA)>
<!--
@attr source attribute on which the regexp will be applied.
@attr provides attribute names that will be provided by this extension.
-->
<!ATTLIST extension
  source CDATA #REQUIRED
  provides CDATA #REQUIRED
>

<!--
Definition of the output of the logdistillation.
-->
<!ELEMENT output (param*, report*)>
<!--
@attr directory the directory where all generated files will be stored
@attr url the url where the reports can be downloaded (to enable links in reports)
@attr content content description of the data processed for the output
@attr skip id of the category or group that must be skipped in the analysis.
-->
<!ATTLIST output
  directory CDATA #REQUIRED
  url CDATA #IMPLIED
  content CDATA #REQUIRED
  skip IDREF #IMPLIED
>

<!--
Definition of a report.
-->
<!ELEMENT report (param*)>
<!--
@attr publisher publisher id of the report: <code>file</code>, <code>mail</code>, <code>feed</code>, ...
@attr format (for future extension) format of the report: <code>txt</code>, <code>html</code>, <code>pdf</code>, ...
-->
<!ATTLIST report
  publisher NMTOKEN #REQUIRED
  format NMTOKEN "txt"
>

<!--
A category definition, to aggregate multiple correlated groups in the global report. Category's description is read
from element's content.
-->
<!ELEMENT category (#PCDATA)>
<!--
@attr id the identifier of the category, which will be referenced by corresponding group definitions
-->
<!ATTLIST category
  id ID #REQUIRED
>

<!--
A group definition, to describe the rules that log events must match to be counted in it.
-->
<!ELEMENT group (description, param*, condition*, report*, plugin*)>
<!--
@attr id the identifier that will be printed in reports and used as a basename for files corresponding to this group
@attr continueProcessing if a log event corresponds to this group, should the log event continue to be compared to
the next groups or simply stop? By default, the classification of a log event stops after the first match: a log
event is assigned to only one group.
@attr save should the log events in this group be saved in a file? Log events are saved in a file named
<code><i>id</i>.log</code>.
@attr category a group can take part in a category by referring category's id
-->
<!ATTLIST group
  id ID #REQUIRED
  continueProcessing (true|false) "false"
  save (true|false) "true"
  category IDREF #IMPLIED
>

<!--
A definition of a condition that a log event must match to be part of corresponding group.
A condition is composed of one ore more attribute match: a log event must match every attribute for the condition
to be ok. If there are multiple conditions defined for a group, a log event has to match only one condition to be part
of the group.
-->
<!ELEMENT condition (match+)>
<!--
@attr tags affect some tags (comma separated) to this condition, for later use by plugins, that can now differentiate
if a log event was matched by this condition or another one.
-->
<!ATTLIST condition
  tags CDATA #IMPLIED
>

<!--
A definition of an attribute match: the log event's attribute is compared to this element's value.
@example %<match attribute="timestamp" type="contains">${date}</match>
<match attribute="severity" type="!equals">Error</match>
<match attribute="message_text" type="regexp">Server state changed to \S+</match>%
-->
<!ELEMENT match (#PCDATA)>
<!--
@attr attribute the name of the log event attribute to test
@attr type the type of comparison that has to be made: it can be <code>contains</code>, <code>equals</code>,
<code>startsWith</code>, <code>endsWith</code>, <code>regexp</code> or the negation of the test when prefixed with
<code>!</code> (<code>!contains</code>, <code>!equals</code>, <code>!startsWith</code>, <code>!endsWith</code>,
<code>!regexp</code>)
-->
<!ATTLIST match
  attribute CDATA #REQUIRED
  type CDATA #REQUIRED
>

<!--
Activation of a plugin for log events in corresponding group.
-->
<!ELEMENT plugin (param*)>
<!--
@attr type type of the plugin
@attr globalReport add info computed by this plugin to the global report?
@attr groupReport add info computed by this plugin to the group report?
-->
<!ATTLIST plugin
  type CDATA #REQUIRED
  globalReport (true|false) "true"
  groupReport (true|false) "true"
>