Enable Logging for Scripting Events

To assist with debugging when developing rules for a business object, you can enable logging and use the log viewer to view events triggered by your business rules. You can also view runtime exceptions as well as diagnostic messages that your own Groovy scripts might have generated.

While trigger starts and trigger ends are always recorded in logs, you'll need to add the print or println statement when you want messages in your script to be written to the log.

By default, logging is not enabled. Once you enable logging, it remains enabled in your session for as long as you are logged in. If your session has expired, you will need to re-enable logging after you log in.

To enable logging:
  1. Click the Logs link at the bottom of the window to open the Logs page.
  2. Select the Enable Logging check box.

    The viewer in the Logs window displays the most recent 250 log entries, by default in chronological order. When a runtime exception occurs, you can see additional details about the offending script and line number where the error occurred in a tooltip when you hover your mouse over the exception message.

    Use search to filter out messages based on the text you enter. To export your log as a text file to your local system, click the Export icon ( Export icon) in the toolbar.

    If you keep the Logs window open while you work, consider the following approach. Before starting a new attempt to reproduce the problem, click the Clear icon (Clear icon) to remove any previous messages generated. After encountering the error you are diagnosing, click the Refresh icon (Refresh icon) to see the latest log messages generated.

Note:

You can also view log messages included in your Groovy code as part of trace files generated for a business object's REST requests when tracing is enabled.