Automation scripts loggers

All logging that is related to scripts is done by the autoscript logger. The log level is set, by default, to ERROR. Only errors that are encountered during script execution, are output to the system console or to the product log file.

Individual script log levels can be used to redirect output statements in the script code to the system console or to the product log file. To ensure that output statements are redirected, set the log level of the individual script to the same log level of the autoscript logger. For example, if the autoscript logger is set to INFO, then the individual script log level must also be set to INFO.

The log level can be changed so that more script execution information is written to the product log file. Some of the statements are from the scripting component while others can be the script code-specific output statements. Each individual script can be configured at different log levels.

Example

A system administrator enters a purchase price value. A field validation script that is associated with the Purchase Price field of the Asset application runs business rules that compute the replacement cost. The system administrator encounters an error that indicates that the script failed to run line number 17 of the script. If required, he can place the output statements in the script code to isolate the specific section of code that is failing. He can set up detailed DEBUG logging to determine the type of variable, either input or output, that was received into or calculated in the script.