Skip to main content

This article explains how to use the OnWebLog to write information to a file as a script runs.

Problem:

When scripting in OnWeb at times it may be helpful to write information out to a file as the script runs. For example, if a variable from a previous step is not available to your script, you may wish to capture the value of the variable as the script runs. How is the OnWebLog() method used?

Resolution:

The syntax of the OnWebLog method is: OnWebLog ("string",["filename"], [iomode])

string Required. The string that you want to record in the log file.
filename Optional. The name of the log file.
iomode Optional. Either "a" (append) or "w" (replace). Default mode is “a”

The default filename is OnWebJS.log and it is located under the bin directory in the OnWeb Server installation (For example: /QOpenSys/usr/OnWeb/bin/ or C:\\Program Files\\NetManage\\OnWeb Server\\bin\\).






Date:

Name:

Description of change:
Date:

Name:

Description of change:

Old KB# 14418

#Rumba
#OnWeb