Log Viewer

In addition to the project administration and console there is also a powerful Log Viewer for displaying different log files of WinCC OA. The log files in WinCC OA are located in the directory <proj_path>/log/.

State and error messages during the project start as well as errors of the running project are shown via the Log Viewer. The Log Viewer is opened automatically via the console when a project is started. The Log Viewer can also be opened via the appropriate button in the console panel (see also Console panel). If the Log Viewer is opened via the console it is also closed together with the console (when the console is closed also the Log Viewer is closed).

In addition debug outputs (e.g. by activating debug flags of single managers - see also Administration of managers) or CTRL error messages are shown in the Log Viewer (if a CTRL script detects an error that cannot be handled via the CTRL programmer in the program cycle e.g. you forgot to declare a variable before it is used - see also Error handling).

CAUTION: The Log Viewer does not support online switching at the moment.
Figure 1. WinCC OA Log Viewer

Some useful functions can be executed and some settings made when using the Log Viewer:

  1. Resize : The size of the Log Viewer window can be minimized and maximized arbitrarily in order to obtain the optimum size.

  2. Row and area selection: By selecting a row or an area in the Log Viewer the shown information can be saved in the clipboard and can be used for further processing (edit with an editor, send an e-mail with log information,...).

  3. Filter criteria : Filters can be defined for the display in the Log Viewer (display log files of selectable managers, display according to the priority).

  4. Color settings for single managers : The output of managers can be shown with colors that can be chosen freely. The system number, the type of the manager, the number of the manager and the replica number e.g. SYS: 1 Ctrl -num 1 REPL: 1 (see figure above) of the managers are shown. The entry means system 1, the CTRL manager 1 and replica 1.

The settings described above can be made via the following buttons of the tool bar:

Closes the Log Viewer and saves the current settings.

Opens an arbitrary log file in a new window.

Figure 2. Window for choosing a log file

Choose an arbitrary log file from the combo box. The file is opened in its own window and can be viewed in more detail. For detailed information about the specific log files see Log Files.

Figure 3. Log file in a new window

In this window functions are available like in the Log Viewer (e.g. copy a selected area into the clipboard, search function).

The settings of the LogViewer are saved globally. Therefore, old entries, for example, manager entries can be selected although the managers do not exits anymore (in a newer version). Therefore, delete the PVSStoolLogViewer.ini file. You can find the file under C:\Documents and Settings\<userName>\Application Data\ETM\PVSStoolLogViewer.ini.

Opens a window for creating further settings in the Log Viewer.

Figure 4. Window for creating settings in the Log Viewer

In this window you can e.g. choose the log files that should be shown in the Log Viewer. Define which log files should be shown in the Log Viewer by enabling the check boxes, or disable the check boxes if you do not want display the log files. (all log files are shown by default).

The Log Viewer shows the new data that was saved in the log file. If a filter is used the visible data is filtered. If the filer is deactivated the data that was visible before is not visible again. This means there is no historic filtering!

On the right side you define the Colors for displaying the single managers in the Log Viewer. The managers are provided with a color by default. The default color can, however, be changed by double clicking a manager. The color is changed at runtime in the current display of the Log Viewer.

In the lower part of the window choose the desired Font from the combo box. The font is displayed in the set size (the size is changed via the spin buttons below the Font combo box). The Log Viewer display is made up of the font and the font size. The font and font size can be previewed on the row next to last.

The maximum number of rows shown in the Log Viewer can be set at the bottom of the window.

If many log entries are added to the log viewer simultaneously, the log viewer skips entries to decrease the CPU load. Via Max.bytes before skip you can specify after how many bytes the log viewer should skip the entries.

The settings are saved and the window is closed via OK. Cancel discards the settings and closes the window.

Copies a selected area into the clipboard.

Opens the search window, which allows a string searching.

Figure 5. Pop-up for string searching

When the "Find text" pop-up window is opened the selected parts of text are applied automatically to the text field "Text to find".

Shows the last entry in the Log Viewer. The scroll bar is moved to the bottom.

Deletes the shown information in the Log Viewer.

Shows only messages with the priority INFO.

Shows only messages with the priority WARNING.

Shows only messages with the priority SEVERE.

Shows only messages with the priority FATAL.

Via the STOP button the "display" of the log viewer is stopped. When the display is stopped, no new information is shown in the log viewer.

The messages that are shown via these buttons and then deactivated are shown again when the buttons are activated. If you click the "Clear view" button in the meantime the messages are deleted and not shown anymore.

The functions that are available via the buttons are also available via menu File and View in the menu bar of the Log Viewer.

Common error messages in the log files

(0), 2005.02.15 23:21:26.705, SYS, WARNING, 33, General error in Data Manager, Data-BG died, will be restarted

This message describes that the Data BG manager was stopped. The system tries to restart the manager. This message can usually be found in the log files after a recovery.

WCCILevent (0), 2005.02.16 00:52:00.390, SYS, SEVERE, 65, Wrong destination address, (SYS: 1 Driver -num 1 CONN: 1), DP_MSG_CONNECT

This message describes that a message should be sent to the driver with the number 1. There is no connection at this time and the process cannot be closed.

WCCILevent (0), 2005.02.26 18:45:40.582, SYS, SEVERE, 65, Wrong destination address, (SYS: 1 Ui -num 1 CONN: 2), DP_MSG_ANSWER

This message describes that a message should be sent to the UI with the number 1. There is no connection at this time and the process cannot be closed.

Show cause of error messages

The log viewer provides the possibility to jump to the cause of an error via a double click on the error message. Therefore proceed as follows:

  • Close the log viewer automatically started with the console

  • Open the log viewer via the GEDI (menu View - Log Viewer)

If there is an error (e.g. an undefined function) within a panel, the corresponding panel is opened in the GEDI and the erroneous shape is selected. In case of an erroneous library, the library is opened and the concerned line is selected.

Log Viewer plug-in

You can write a plug-in in C++ using an API. If the plug-in is located in the WinCC OA bin directory, the log viewer is able to receive data provided by the plug-in. Thus, it does not read the log files but e.g. data from a relational data base. Install the WinCC OA API and you can find an example under api/ExternLogFeed. The use is described in the ExternLogFeed.hxx file (you then have to execute qmake, make and install the shared-lib/dll as described in the ExternLogFeed.hxx file).

Using the command line option WCCOAtoolLogViewer -logFeed you can define whether a plug-in should be used. Without the option the LogViewer is started normally.

Preformatted text can be passed to the LogViewer via the log viewer plug-in. If the text starts with "<qt>" and ends with "</qt>", the LogViewer does not format the text since the text is preformatted. You can also pass multiple lines which are separated by \n.