This document covers the following topics:
The server logs viewer is preconfigured to view the server logs of the user interface components. All user interface components of a project which has been enabled for Ajax Developer share the same server log. This is described under Preconfigured Server Logs.
In addition, the server logs viewer can be used to view all kind of other log files. This is described under Advanced Usage.
The Server Logs Viewer view is automatically opened when a project is enabled for Ajax Developer. A predefined log viewer is automatically available for this project. To display this predefined log viewer in the Server Logs Viewer view, you have to create an entry for it, as described below.
To create an entry for a predefined log viewer
In the Navigator view, select the project which has been enabled for Ajax Developer.
Go to the Server Logs Viewer view.
Choose the following icon in the local toolbar:
In the resulting dialog box, open the Select a predefined log viewer drop-down list box and select the predefined log viewer. The name of the predefined log viewer is <project-name>/Ajax Developer Server Log.
When you select the predefined log viewer, Ajax Developer automatically sets the correct log location for the project. A predefined filter is used. If you want, you can customize the filter settings. See Creating a Log Viewer for further information.
Choose the
button.An entry for the log viewer is now shown in the Server Logs Viewer view. When you double-click this entry, the log file is opened. See also Opening a Log Viewer.
The server logs viewer can also be used to view other log files, for example, the server logs of the Tomcat server. The server logs viewer can be used to view single or multiple log files. A log file records activities and operations that occurred on a server/computer, maintaining an operational history of these activities. A log file is identified by its .log extension.
A log viewer allows the user to:
Specify refresh intervals.
Specify the number of lines to be displayed from a file.
Customize the way to view files by specifying filter conditions.
Save the log files added in the viewer so that the user is able access them easily the next time.
Provide extension points so as to enable other Eclipse plug-ins to contribute their log files for viewing.
The following topics are covered below:
The Server Logs Viewer view is automatically opened when a project is enabled for Ajax Developer.
When this view is not active, you can open it as described below.
To open the server logs viewer
From the
menu, choose .In the resulting Show View dialog box, expand the Software AG NaturalONE node and select Server Logs Viewer.
Choose the
button.The following view appears.
You can create an entry for a new log viewer by using the settings of an existing log viewer (for example, of the predefined log viewer) and then modifying the settings according to your requirements.
To create an entry for a new log viewer
Go to the Server Logs Viewer view.
Choose the following icon in the local toolbar:
The following dialog box appears.
Specify the following information:
To create a new log viewer, keep the default value New Log Viewer.
If you want to use an existing log viewer as the basis for the new log viewer, select it from this drop-down list box. The description for the selected log viewer is then shown in the Description text box.
Select this option if the log file that must be viewed is fixed, that is, if its name does not change. The log viewer will view/read this file every time. Use the
button to select the log file.Select this option if the name of the log file changes on some criteria. For example, if the name of the log file contains a timestamp which is changed daily, the name of the log file also varies daily. Specify the following information in this case:
Option | Description |
---|---|
Select log file directory | Use the | button to select the directory containing the log files. For example, <myworkspace>\.naturalone\apache-tomcat\logs for the log files of your local Apache Tomcat.
Log file name pattern | Specify the date pattern of your log
files. For example, catalina.${yyyy}-${mm}-${dd}.log for
the log files of your local Apache Tomcat.
Note: |
Add pattern | Select the date format from the available options in the drop-down list box. Choose the button containing the plus sign to add each pattern to the Log file name pattern text box. |
Enter a name to identify this viewer.
The log viewer refreshes the view as per the interval you specify here.
Choose the option to either view the entire log file or only a specified number lines when first opened for viewing. If you select the latter option, you need to specify the number of lines to be displayed.
Choose the
button if you wish to add filters to the log files you view. Using these features, you can filter lines based on some conditions such as skipping the entire line or changing the display style in the view.You add the line filters in the resulting dialog box. For example, to view a line highlighted in black and the font color as green, specify the following:
From the If line drop-down list box, select Contains text and enter "Info" in the text box.
Select the Change the style of the line option button.
Choose the
button and select the color green.Choose the
button and select the color black.Choose the
button.The following information is then shown:
If line CONTAINS "Info" THEN change its style.
To remove the selected line filter or all line filters, choose either the
or button.Choose the
button.When you edit a log viewer, the same information is shown as when adding a new log viewer.
To edit a log viewer
In the Server Logs Viewer view, select the log viewer that you want to edit.
Invoke the context menu and choose
.Or:
Choose the following icon in the local toolbar:
A dialog appears.
Modify all required information as described in Creating a Log Viewer.
In edit mode, it is not possible to change the log file to be viewed. The corresponding options are disabled.
Choose the
button.When you open a log viewer, it is shown on a separate tab of the Server Logs Viewer view. It shows the contents of the defined log file.
To open one or more log viewers
In the Server Logs Viewer view, select the log viewers that you want to open.
Invoke the context menu and choose
.Or:
Choose the following icon in the local toolbar:
Or:
If you want to to open a single log viewer, you can simply
double-click it.
A separate tab for each selected log viewer is provided in the Server Logs Viewer view.
If you want to remove such a tab, choose the close button that is shown next to the tab name.
When you remove a log viewer, it is no longer shown in the Server Logs Viewer view.
To remove one or more log viewers
In the Server Logs Viewer view, select the log viewers that you want to remove.
Invoke the context menu and choose
.Or:
Choose the following icon in the local toolbar:
A dialog appears, asking whether you really want to remove the selected log viewers.
Choose the
button.