DATETIME action

<< Click to Display Table of Contents >>

Navigation:  Event and Object Analysis > Capture Results Filtering > Filtration Basics > Rules > Actions >

DATETIME action

Sets a string label with the current date and time for the message.

Description

This action sets a string label (label) or the message, with its value being the current date and time string. If this string label has already been set for the message, its value is replaced with a new one. Is used to track the time taken by the message to passes through the filter.

Format

<action name="datetime" value="label-name" />

The "name" attribute:

The name attribute contains the action name: name="datetime".

The "value" attribute:

The value="..." attribute specifies the name of the string label to be set.

Example:

Set the FILTER-BEGIN processing start and the FILTER-END processing end tags for all messages.

<?xml version="1.0" encoding="utf-8"?>
<filter name="Message filter" version="1.0">
 <comment>Message filter.</comment>
 
 <table name="main">
   <rule enabled="1">
     <comment>
       Set the FILTER-BEGIN processing start label
       for all the messages.
     </comment>
     <action name="datetime" value="FILTER-BEGIN" />
   </rule>
 
   <rule enabled="1">
     <comment>
       Set the FILTER-END processing end label
       for all the messages.
     </comment>
     <action name="datetime" value="FILTER-END" />
     <action name="accept" />
   </rule>
 </table>
</filter>