5.11.1 Extract Text

This section explains how to extract a text. In the Details window the context of the text which should be extracted must be selected. The context consists of the extractable text and the preceding and succeeding texts which are required to unambiguously define the extractable text. All log records that contain the specified context are considered when extracting texts. Example Extracting the initialization times is used to illustrate what should belong to a context.

2013-10-10 10:12:25,000 I 0x1BE4 Database initialization time: 1234 ms.

2013-10-10 10:12:26,000 I 0x1BE4 Average transaction time: 3333 ms.

2013-10-10 10:12:27,000 I 0x1BE4 Application initialization time: 543 ms.

Extracting the initialization times

When you want to extract all initialization times as they are shown in Example Extracting the initialization times the text “initialization time: 1234 ms.” is an appropriate context because this ensures that both the database and application initialization times can be extracted and that the average transaction times are not included. In order to identify all initialization times it is important to exclude “Database” and “Application” from the context. In the Details window select e.g. “initialization time: 1234 ms.” and right-click to open the context menu of the Details window. In the context menu you have to select Extract and Text... to open the Extract Text dialog.

Extract Text dialog after opening
Extract Text dialog after opening

The Extract Text dialog after opening is shown in figure Extract Text dialog after opening. Some of the fields are still empty. The next step is select the text that should be extracted from the context in the Select the text part that should be extracted if it appears in the specified context field as shown in figure Extract Text dialog after selecting the text part to extract. This will immediately update the Prefix, Extract and Postfix fields. If the options are set as desired the text extraction can be started by clicking Save & Reload. If only the Save button is pressed the layout will be adapted but the changes are not visible in the user interface. The text extraction can also be canceled.

Extract Text dialog after selecting the text part to extract
Extract Text dialog after selecting the text part to extract

The fields of the Extract Text dialog are explained in detail in table Extract Text options.

Extract Text options
Property Description
Select the text part that should be extracted if it appears in the specified context Displays the selected context from the Details window. The text to be extracted must be selected in this edit control. This will update the Prefix, Extract and Postfix edit controls.
Column Specifies the column to be used for displaying the extracted text. You should provide a meaningful name here.
Prefix Contains the text part of the context preceding the extracted text. Regular expressions might be used.
Extract

Contains the extracted text. The type of the extracted text is one of the following:

Time, DateTime, Pathname, Filename, Alphabetic, Alphanumeric, Text, MultiText, String, Custom

The types are defined in the layout's grammar definition file using regular expressions.

Postfix Contains the text part of the context succeeding the extracted text. Regular expressions might be used.
Format

>Defines the format of the extracted text in its column.

Unformatted - the extracted text is left aligned, no padding
Right-aligned, space padding - the extracted text is right aligned and padded with spaces on its left side
Right-aligned, zero padding - the extracted text is right aligned and padded with zeros on its left side
Left-aligned, space padding - the extracted text is left aligned and padded with spaces on its right side
Left-aligned, zero padding - the extracted text is left aligned and padded with zeros on its right side

The number of padding characters can be configured.