11.3.1 Merge Records and Recalc Records

The video tutorial Graph demo, Merge Records and Recalc Records on Youtube will explain the modes Merge Records and Recalc Records.

When Ascolog Insight merges several logs that contain columns created by a custom columns definition the following procedure is followed:

  1. The values for the custom columns are calculated for each single log independently from the other logs before the logs are merged. This means that in the merged log the custom columns have their original value. This step 1 is called merge records and this step is always done when merging logs.

  2. For the merged log created in step one the values for the custom columns are recalculated. The merged log is handled as if it is one single log. This means that the values of the custom columns depend on all input logs contributing to the merged log. This step is called recalc records and is optional.

In the Tools menu and in the Toolbar you can find the menu items Merge Records and Recalc Records which you can use to switch between the merge records and recalc records mode. The menu item that is active is displayed in gray and cannot be selected again.

If Recalc Records is always gray and selecting Merge Records does not have any effect it is because of the option AutoRecalcMode which can be configured in the Options dialog. For a more detailed description of AutoRecalcMode see section Options.

When you select the command Force Recalc Records from the Tools menu Ascolog Insight will execute the recalc records process. However, the current mode of merging custom columns will not be changed.

In order to illustrate merge records and recalc records let's have a look at two log files which should be merged. Example 1 and Example 2 show how these log files are displayed in their file tabs in the Log window. In the custom columns definition the lnr command is used to create a custom column LINENUMBER which displays the line number of a log record.

TIMESTAMP TEXT LINENUMBER
2011-10-10 15:01 Log record 1 1
2011-10-10 15:10 Log record 2 2
Example 1: Log file 1 as displayed in its tab in the Log window
TIMESTAMP TEXT LINENUMBER
2011-10-10 15:02 Log record 3 1
2011-10-10 15:05 Log record 4 2
2011-10-10 15:06 Log record 5 3
Example 2: Log file 2 as displayed in its tab in the Log window

The line numbers in the merged log are calculated differently depending on whether merge records or recalc records is the active mode. The merged log records are ordered by their timestamps.

The merged log when merge records is the active mode is displayed in Example 3. The log records have the same line number as in their file tab, so many line numbers occur twice.

TIMESTAMP TEXT LINENUMBER
2011-10-10 15:01 Log record 1 1
2011-10-10 15:02 Log record 3 1
2011-10-10 15:05 Log record 4 2
2011-10-10 15:06 Log record 5 3
2011-10-10 15:10 Log record 2 2
Example 3: Merged log when merge records is the active mode

The merged log when recalc records is the active mode is displayed in Example 4. The line numbers for the custom column LINENUMBER are recalculated so that each log record is assigned the line number of its position in the the merged log.

TIMESTAMP TEXT LINENUMBER
2011-10-10 15:01 Log record 1 1
2011-10-10 15:02 Log record 3 2
2011-10-10 15:05 Log record 4 3
2011-10-10 15:06 Log record 5 4
2011-10-10 15:10 Log record 2 5
Example 4: Merged log when recalc records is the active mode