Execution Log

As described earlier, the Execution Log automatically displays in the Project panel when a script is executing. It displays, accumulatively, all output from the script being executed based on the set 'logging level'. The logging level allows you to specify which output to view based on the importance levels, as below:

Priority

Level

Description

7 (highest)

SEVERE

Severe errors which typically result in termination of the script execution. 

6

WARNING

Warnings or admissible errors allowing the script to continue.

5

INFO

Informational messages.

4

CONFIG

Configuration messages (the default minimum level).

3

FINE

Low priority messages (typically used for detailed debugging messages).

2

FINER

Lower priority messages.

1 (lowest)

FINEST

Lowest priority messages.

 

OFF

A pseudo level used just in the configuration framework to disable logging.

This level is set within the preferences, which can be accessed through a right click in the "Exec Log" window. 

The log facility is based on the following principles:

  • Each log message has one of the seven predefined levels which reflect the message importance.
  • The log records only those messages which are equal to or higher than the minimum level specified in the Execution Log Preferences. This allows building scripts with abundant logs of various levels and then controlling the scope of logging for a particular script execution.
  • The automation framework by default logs the most important events in the script execution life cycle such as the script start and end points, report creation, connection to the system under automation, failed image comparisons and any severe I/O, misconfiguration and runtime errors.
  • The script may create its own custom log messages through calls of the Log command (TPR scripts) or the log() method (Java scripts).
  • Each script execution creates its own log (the log is not cumulative across script executions). The log is saved to the log.html file in the output (report) path after the script finishes. To view the log while the script is executing use the Execution Log Viewer described below.
  • The log file is recognized and displayed by the Project View. If the script creates a report using the Enterprise Report Provider the log file is also linked to the report header. If the Enterprise report is located in a 

Do not confuse the script execution log with the T-Plan Robot Enterprise application log maintained through the Help/Log Viewer window. The application log is open from the Robot start until it finishes and it merely collects all messages which are being printed out into the standard output (console/terminal, command prompt). The only things the log mechanisms have in common is that when a script execution throws an error which gets also printed into the standard output, the error message will appear in both logs.

As mentioned above, your executing script may print logs to the file through the "Log" command, as follows:

Log "<text>" [level=<logLevel>]

This Log command can be placed anywhere within your script and is often based on the outcome of the previous action.