- Contents
Log Viewer Help
Lines of Context
This criteria filters for messages that appear within a number of lines preceding or following the result of some other filter criterion. This is best explained by example. Suppose that a log contained the following lines of data:
Hello
Goodbye
January
December
Halloween
And, suppose that you previously defined a regular expression string match (^J.*) to match all messages that start with the letter J. That string match would return a result set of:
January
July
If you were to define one leading line of context, the result set would return:
Goodbye returned because it is one line before January
January returned because it matched the regular expression
Halloween returned because it is one line before July
July returned because it matched the regular expression
As you can see, one line before each match is included in the result set. This is very useful if you have a log message that is simply "Catching general exception" from an exception handler. If you filter the log for that statement it tells you there was an exception, but not what that exception was. If you print ten or so leading lines of context, then your log filter matches all of the exceptions, but print out the previous ten lines before each and you can tell what the exception was.
If you create a Lines of Context node as a parent node, you can build a sub-filter below it. The Lines of Context criteria is applied to the result of the sub-filter.
Enable This Filter check box
This check box is selected by default, which causes this filter criteria to be evaluated when the filter is applied. Clear this check box to temporarily exclude this criteria when the filter is applied.
Invert This Filter check box
To invert the filter result, select this check box. The filter selects all entries that do not match the criterion.
Leading Lines of Context
The number of preceding lines to include in the filter result.
Trailing Lines of Context
The number of trailing lines to include in the filter result.
OK button
Closes the Filter Configuration dialog box and applies the filter.
Cancel button
Closes the dialog box, but does not change filter settings.
Related Topics