Print statements
Print statements can be placed in a script to capture logs specific to the script. The syntax of print statements depends on the language that is used to write the script.
The print statements are sent to the logger as ERROR, INFO, or DEBUG statements. The statement level depends on the level you have specified for the automation script you are using. For example, if you set the level of the automation script and autoscript logger to DEBUG, the print statements are written to the log file as DEBUG statements. If you set the autoscript logger to ERROR level, then the print statements inside the automation script are not written to the log file.
Example of a Jython print statement
A print statement can be simple, such as print "$$Entered automation script
XYZ"
. The print statement can also be an expression, such as print "$$Automation
script variable site value is:" + siteid
.