5.6 Color Rules

The video tutorial Color rules, Bookmarks and Graphs on Youtube will explain how to use color rules, bookmarks and graphs.

Color rules apply a certain color scheme to log records or to parts of a log record in order to highlight important information.

Since a color rule is an analyze function the usual ways for creating analyze functions can be applied. How to create analyze functions is described in How to create Analyze Functions and Filter Expressions.

When you load a new log file Ascolog Insight automatically creates a color rule for this file so that all log records of this file can be recognized by their color. The node of such a color rule is created in the Merge Colors category.

When the user creates a color rule the default category for color rules is a category called Color Rules. The exception are color rules for columns created by using the context menu of a column. These color rules are located in the Column Colors category. Figure Color rules ordered in categories by their type shows the categories for color rules as they are provided by Ascolog Insight.

Color rules ordered in categories by their type
Color rules ordered in categories by their type

In order to configure the properties of a color rule, select the appropriate color rule in the Functions tree and right-click. This will open the context menu where you must select Edit... to open the Color Rule dialog shown in figure Configuring a color rule.

Configuring a color rule
Configuring a color rule

Press the Bkg... button to change the background color or the Text button to change the text color of the color rule. Both commands will open another dialog where you can select a color from a wide range of colors. If you press the Random button Ascolog Insight will randomly create a color scheme for the color rule. The selected color scheme will be displayed in the Color field.

The Apply rule to field specifies to which column a color rule is applied. If there is a filter expression the color rule might only be applied to some cells of the column. When there are several color rules for the same cell the Z-Order field specifies the visibility of a color rule in relation to the other color rules. If several color rules have to be applied the one with the highest priority is used. The following precedence settings are possible: Lowest, Lower, Medium, Higher, Highest, Automatic selection

The values of the Apply rule to and Z-Order fields are set by Ascolog Insight when a color rule is created. You usually don't have to change them. However, if you need a different color setting than what is proposed by Ascolog Insight you can manually change the Z-Order to a different priority to set a color to the foreground or background.

As already mentioned above there are three standard categories of color rules in Ascolog Insight. What values of the Apply rule to and Z-Order fields are used by default for these categories is shown in table Color rule types.

Color rule types
Type Description Apply rule to Z-Order
Color rule Color rule for specific cells of a column. Automatic selection Automatic selection
Column color Color rule of a complete column. Created by clicking on the header of a column and by selecting Color Rule. Column that was selected during creation of the rule. Lower
Merge color Color rule of a log file. Created by Ascolog Insight when a log file is loaded. Full row Lowest

Please not that in the Apply rule to field you can select the values Full row and FULLROW which are different. The value Full row refers to all columns, i.e. to all cells of a row (remember that a log record is represented by a row) whereas FULLROW is a single column that contains the complete log record.

In the Apply rule to field Automatic selection means that Ascolog Insight will examine the color rule's filter expression to determine to which column the color rule has to be applied. If the color rule's filter expression consists only of one expression like a simple comparison (e.g. TYPE==Error) then it will apply the color rule to this column (TYPE in this example), otherwise the color rule will be applied to the first column which is mentioned in the filter expression, e.g. when the filter expression is (LEVEL==High) || (TYPE==Error) then the color rule will be applied to the column LEVEL.

If two color rules have the same Z-Order the color of the color rule that was created later is on the foreground and visible.