AutoPatrol, Bureaucrats, Administrators
683
edits
(→Tag) |
|||
Line 352: | Line 352: | ||
=== <event> Tag === | === <event> Tag === | ||
Tag <nowiki><event></nowiki> defines event to be generated if current log record match to regular expression defined in <nowiki><match></nowiki> tag. Inside <nowiki><event></nowiki> tag you should specify event code to be generated (or event name if you configure server-side syslog parsing). If you wish to pass parts of log record text extracted with regular expression as event's parameters, you should specify correct number of parameters in '''params''' attribute. | Tag <nowiki><event></nowiki> defines event to be generated if current log record match to regular expression defined in <nowiki><match></nowiki> tag. Inside <nowiki><event></nowiki> tag you should specify event code to be generated (or event name if you configure server-side syslog parsing). If you wish to pass parts of log record text extracted with regular expression as event's parameters, you should specify correct number of parameters in '''params''' attribute. | ||
=== <context> Tag === | === <context> Tag === | ||
<nowiki> | Tag <nowiki><context></nowiki> defines activation or deactivation of contexts. It has the following format: | ||
<syntaxhighlight lang="xml"> | |||
<context action="action" reset="reset mode">context name</context> | |||
</syntaxhighlight> | |||
Possible actions are: | Possible actions are: | ||
{| class="wikitable" | |||
{| | |- | ||
| | ! Action !! Description | ||
| | |- | ||
| clear || Deactivate (clear "active" flag of) given context. | |||
|- | |- | ||
| | | set || Activate (set "active" flag of) given context. | ||
| | |} | ||
Reset mode determines how context will be deactivated (reset). Possible values for reset mode are: | Reset mode determines how context will be deactivated (reset). Possible values for reset mode are: | ||
{| class="wikitable" | |||
{| | |- | ||
| | ! Reset mode !! Description | ||
| | |- | ||
| auto || Deactivate context automatically after first match in context (match rule with '''context''' attribute set to given context). | |||
|- | |- | ||
| manual || Context can be deactivated only by explicit <nowiki><context action="clear"></nowiki> statement. | |||
| | |||
|} | |} | ||
Both '''action''' and '''reset''' attributes can be omitted; default value for '''action''' is '''set''', and default value for '''reset''' is '''auto'''. | |||
== Examples of Parser Definition File == | == Examples of Parser Definition File == |