Enabling trace logging

You can enable trace logs for different features within IBM OpenPages® with Watson™ to help diagnose issues that you might run into.

About this task

Trace logging generates a large amount of data on the application server. Enable trace logging only during testing and when other users are not on the system. Make sure to disable trace logging before users access the server again.

When trace logging is enabled, separate log files are created in the <OP_HOME>/aurora/logs/debug directory. These log files have a suffix that indicates the log type, for example <server_name>-workflow.log, <server_name>-sdk.log, and so on.

Generally, trace logs contain the following information:

  • Enter and exit messages for relevant API calls
  • Timings for each method
  • Targeted debug logging

The following trace logs are available:

  • Trigger Logger – Logs trigger evaluations and executions.
  • Workflow Logger – Logs all workflow API calls and action evaluations.
  • Calculation Logger – Logs all calculations.
  • Cognos® Integration Logger – Logs computed fields, reporting fragments, and connections to Cognos Analytics from OpenPages.
  • SDK Logger – Logs all SDK API calls.
  • Cache Logger – Logs cache loading at startup and logs updates that occur over time.
  • Persistence Logger – Logs database access.
  • Custom REST Logger – Logs access to custom rest endpoints.

In 8.2.0.1 and later, you can also use the Login Logger to log all single sign-on authentication events. The log file is named <OP_HOME>/aurora/logs/debug/<server_name>-auth.log.

Procedure

  1. Log on to the OpenPages application server.
  2. Go to the <OP_HOME>/aurora/conf directory.
  3. Back up the auroralogging.properties file.
  4. Open the auroralogging.properties file with a text editor.
  5. To use a trace logger, remove the # at the beginning of the line.
    In this example, the Workflow Logger is enabled:
    log4j.logger.com.ibm.openpages.api.service.ejb.workflow.impl=TRACE#com.openpages.aurora.common.logging.Log4jEventLoggerLevel, workflow
  6. To enable logging for single sign-on authentication events, do the following steps:
    Note: This feature is supported in 8.2.0.1 and later.
    1. Uncomment each line in the # login logger section:
      # login logger
      log4j.logger.com.openpages.apps.session.OPAppSession=TRACE#com.openpages.aurora.common.logging.Log4jEventLoggerLevel, auth
      log4j.logger.com.openpages.aurora.service.security.SecurityUtil=TRACE#com.openpages.aurora.common.logging.Log4jEventLoggerLevel, auth
      log4j.logger.com.openpages.singlesignon=TRACE#com.openpages.aurora.common.logging.Log4jEventLoggerLevel, auth
      log4j.logger.com.openpages.apps.common.authentication=TRACE#com.openpages.aurora.common.logging.Log4jEventLoggerLevel, auth
      log4j.logger.com.ibm.openpages.app.logon=TRACE#com.openpages.aurora.common.logging.Log4jEventLoggerLevel, auth
    2. To increase the logging level from DEBUG to TRACE, do the following steps.
      Attention: When the logging level is set to TRACE, the log can contain Personal Information (PI) such as usernames and emails.
      1. Locate the following line:
        #TRACE level may contain sensitive information such as user names
        log4j.appender.auth.Threshold=DEBUG#com.openpages.aurora.common.logging.Log4jEventLoggerLevel
      2. Change Threshold=DEBUG to Threshold=TRACE:
        #TRACE level may contain sensitive information such as user names
        log4j.appender.auth.Threshold=TRACE#com.openpages.aurora.common.logging.Log4jEventLoggerLevel
  7. Save your changes and close the file.
  8. When you finish debugging, disable the trace loggers.
    1. Restore the backup of the auroralogging.properties file. Or, type a # at the start of the lines.
    2. Restart the OpenPages application server.