You can create custom attributes in Log Viewer that you can use to filter your log files. Custom attributes are attributes which are created by applying a regular expression to an existing attribute. This is particularly useful for Log4J Messages which typically contain a long message containing many bits of data, unlike the attribute name/value pairs found in N2LF messages.
Procedure
From Log Viewer, click
Attributes.
Select the view you want to load from the Load custom attributes from view drop-down list.
Click
Add.
A new line is added.
Click in the new line under
Source Attribute and type in the source attribute you want to use. For example,
messageID.
Click in the new line under
Expression and type in the expression you want to use. The expression is a standard Java Regular Expression, and uses the bracket notation to define a group within the expression which is extracted into the new attribute. For example, the following expression
My Log Message uses value: (.*) extracts only the characters after the value ":"
Click in the new line under
Target Attribute and type in the name of your custom attribute. You can call this anything you want.
Click in the new line under
Target Attribute Type and type in the type of your custom attribute. For example,
INT.
Click
OK or click
Cancel to exit the dialog without saving your changes.
You can delete a custom attribute at any time by selecting it in the
Attributes dialog and clicking
Delete.
You can click
Save view to save your current settings as a view. Enter the name of your view in the
Save view dialog and click
OK. The newly created view is now available for you to use in the
View drop-down list.