Customizing event message
You can customize messages that are displayed in events. The message must consist of string literals, built-in macros, and the elements provided in the search string.
You can use built-in macros to customize messages for text as well as XML instances.
Displays the log file full path
Displays the search identifier
Displays the name of the LOGMON instance
Displays class name of an instance
Displays the parameter name
Displays the logical name
For text instances, %x displays the xth word or column from the matched string in the text instance, where x is a number.
For XML instances, %x displays the xth element from the matched string in the XML instance, where x is an element.
Displays the x through y columns from the matched string in a text instance, where x and y are numbers
The custom event displays only the element content or attribute values that are present in the search string. Thus, a custom event message is a subset of the search string result.
Thus, %x displays content of the xth element when there is a match from the respective search string. For example, suppose that the XML search string is as follows:
To get the content of the <vm> element in the event, the custom event should include %1, where %1 is substituted with the content of the second element (that is, <vm>). Thus, %1 corresponds to the <vm> element, %2 corresponds to the <level> element, and %3 corresponds to the <class> element and so on. The value increments with every element that is provided with some regular expression to match.
You can also specify a range of elements by using %x-y, where x and y are numbers. The %x-y includes the content of all the elements ranging from x to y, including both x and y, in the respective event. To include the content of all the elements from the match string, you can provide %1- in the custom event message.
You can also add constant string literals in the custom event message. For example, you can use the following text:
The book name is %1.