4.4 Creating a Layout with the Wizard

The video tutorial Layout Creation Wizard on Youtube will explain how to create a layout with the wizard.

If the layout does not already exist you can easily create a layout with the layout creation wizard. This chapter will demonstrate how to create a layout for the log records shown in Example 1 with the layout creation wizard.

2013-02-27 22:56:37,206 Info Low User A logged in.
2013-02-27 22:56:37,206 Error High File not found!

Example 1: A layout will be created for these log records

Select a log record in the Log Window, open the Layout menu and select Creation Wizard... The dialog shown in figure Header selection will open and the selected log record will be displayed in the Header selection edit control. If you do not select a log record and start the layout creation wizard you won't see this dialog but the one shown in figure Identified columns of the sample header. In all dialogs of the wizard you can use the Back and Next buttons to switch between the dialogs of the wizard. Press the Cancel button to stop the layout creation wizard without creating a layout.

Header selection
Header selection

As it is shown in figure Header selection select the header of the log record. A header provides meta information about the logged event (e.g. severity, type, time of occurrence, etc.) and it is recurring. If you are not sure what you should select read the section An Introduction to Logs and Layouts to get an idea of log headers. In figure Header selection the header is already selected which is indicated by the blue background color. The header consists of the timestamp, the log record type (“Info”), the log level (“Low”) and the separators between the header and the description which is in this example a colon and a white space. It is generally a good idea to include the header/description separators in the header so that they do not indent the description in the TEXT column. The text “User A logged in.” is not part of the header but of the description because it described the logged event. After you have selected the header press the Next button to proceed. The header is analyzed by the wizard. It will try to identify the different parts of the header and it will assign columns to the different parts. The columns will be displayed in the next dialog (see figure Identified columns of the sample header).

Identified columns of the sample header
Identified columns of the sample header

In the figure Identified columns of the sample header the Sample header data edit control displays what was selected in the Header selection of the previous dialog. If you did not select a log record before opening the layout creation wizard of figure Identified columns of the sample header is the first dialog you will see and you have to enter the header of your log record in the Sample header data edit control. After you entered or modified the header press the Scan button so that the wizard will analyze the header and create columns for the different parts of the header. The created columns are displayed in the Extracted columns preview. If the columns are correct press Next to continue, otherwise modify the header. You can change the column names in the Grammar Definition dialog after completing the wizard.

In the next step the layout creation wizard proposes a name for the layout and a folder for storing the layout (see figure Specifying the location of layout files). Ascolog Insight has a default folder for storing layouts which is the proposed by the wizard. The default folder for layouts is the folder “LAYOUTS” which is a sub-folder of the data folder. The location of the data folder depends on the installation method that was used for installing Ascolog Insight. How to find the data folder is described in How to Install.

Press the “...” button to open a file dialog to select a different path. If you check the Create Directory for layout check box the wizard will create an own folder for the layout which is recommended. Press the Next button to continue.

Specifying the location of layout files
Specifying the location of layout files

The last dialog shown in figure Layout creation summary is a summary so you can verify if the settings you made are correct. If you check the Apply layout check box Ascolog Insight will immediately use the layout after pressing the Finish button, otherwise the currently loaded layout will be used. If the settings are correct press the Finish button to create the layout. If you press the Cancel button the layout creation will be aborted and all the entered information is canceled.

Layout creation summary
Layout creation summary

Detailed information about layouts can be found in the chapter Layouts - Advanced Topics.

When you ticked the Apply layout check box Ascolog Insight will reload the new layout created by the layout application wizard. Reloading means that the layout is loaded and any loaded log files are kept open (see Load and Reload commands described at the beginning of chapter Working with Existing Layouts). If you changed the layout that was loaded when starting the layout creation wizard the dialog shown in figure Reload new layout and save changes in old layout offers you the possibility to save or discard these changes. 

Reload new layout and save changes in old layout
Reload new layout and save changes in old layout