Debugging scripts

You can use different tools to help you debug scripts.

When debugging scripts, use the following tools:
  • Use log4j for logging and debugging. The tool allows you to control which output levels should be logged and where these outputs should go. There are five output levels: debug, fatal, error, warn, and info. The following functions are available:
    Logger getLogger(String), Logger::loggerDebug, Logger::loggerInfo, Logger::loggerWarn, Logger::loggerError, and Logger::loggerFatal
    Note: All user log statements are prefixed with com.ibm.ccd.wpc_user_scripting.
    Define routes in file $TOP/etc/default/log4j2.xml to route the logging and debugging messages to various log files.
  • For application-related issues, all exceptions are captured in the exception.log file in the appsvr logs directory ($TOP/logs/appsvr_server_name/exception.log).
  • For job schedule issues (when a scheduled job fails on run), all exceptions are captured in the exception.log file in the scheduler logs directory ($TOP/logs/scheduler_server_name/exception.log).
  • For workflow-related issues, all exceptions are captured in the exception.log file in the workflowengine logs directory ($TOP/logs/workflowengine_server_name/exception.log).
  • To get more logging by the system, in the <Logger></Logger> tag of $TOP/etc/default/log4j2.xml, set priority="debug".