Rules

Rules are used to assign an action to a filter.  This is useful for changing the behaviour of LogViewPlus based on the information detected by a filter.  Examples include changing the log item color or clearing the log file.

Rules can only be applied to filters.  If you would like a rule to apply to all log entries in a log file, consider creating a log level filter which matches all rows.

Once created, all rules that apply to a log file can be managed as a group at the file level using the Rule Manger.  Rules can also be managed individually by re-opening the Rule Wizard.  This can be done by selecting the appropriate view and executing the Rules command.  Alternatively, after the rule has been created you will see a blue indicator icon to the left of the view at both the log file and filter level.  Double clicking this icon will also help you to manage the rule.

When you create a rule in LogViewPlus, you will notice two modifiers added to the log tree view.  The first modifier is on the log file.  This modifier can be used to edit all rules applied to the log file using the Rule Manager.  The second modifier is on the filter.  This modifier can be used to open edit the rule using the Rule Wizard.

LogViewPlus currently supports the following rule actions:

Action
Description
Set foreground and background color
Changes the foreground and background color of all rows in the filter.  This setting overrides all other format settings.  Format settings for a log entry will be applied across all views.
Clear all log entries
Removes all log entries from the current log file.  This action might be helpful if you were tailing a log file and wanted to reset it on application restart.
Stop / Start a new session.
For every pair of matching log entries, this will create a new date time filter on the root log file.  If the number of log entries is odd, a new session filter will be started.  This is useful for dividing your log file into time increments.
Add a bookmark
Adds a bookmark to all rows in the filter.
Apply a template
Applies a pre-defined template to the root log file.
Set the pretty print type
Changes the pretty print format type for all rows in the filter.  The pretty print type will be respected across all views.


< >