Managing Integration Gateway Message and Error Logging

This section provides an overview of message and error logging and discusses how to:

  • Set up message and error logging.

  • View non-English characters in integration gateway log files.

  • Manage message logging.

  • Manage error logging.

Error and message logging is a gateway service that you use to monitor messages that flow through the integration gateway.

Logging takes place within both target and listening connectors. Connectors can log all message requests and responses. As a result, you can use logging to:

  • Track message flow.

  • Troubleshoot processing errors.

By default, an integration gateway logs all errors and warnings, as well as information of important, standard, and low importance.

Set up message and error logging by using the integrationGateway.properties file. Use the Logging Setting section to view or change default settings, such as the level of gateway logging, where the system writes log files, the maximum size of the log file, and the number of file backups or archives to keep.

To view non-English characters in integration gateway log files, enable UTF-8 encoding in your web browser. For example, if you are using Microsoft Internet Explorer, you can enable UTF-8 encoding by selecting View, Encoding, Unicode (UTF-8). If you are using Mozilla FireFox, you can enable UTF-8 encoding by selecting View, Character Encoding, Unicode (UTF-8).

Message logging records the following information for messages that pass through the integration gateway:

  • Time and date.

  • Message description.

  • Content of the passed message object.

  • Message level.

The default location of the integration gateway message log is <PIA_HOME>\webserv\<DOMAIN>\applications\peoplesoft\PSIGW.war\msgLog.html.

Change the location of the log in the integrationGateway.properties file.

Message Logging in Target Connectors

Message logging in a target connector occurs:

  • Before delivering the request to the external system.

    The connector logs the request in the format in which the external system delivered it. For example, an HTTP target connector logs the exact HTTP output stream request. The PeopleSoft target connector logs the MIME request to be sent to the integration engine.

  • After it receives a response from the external system.

    The connector logs the response in the format in which it receives it. For example, an HTTP target connector logs the exact HTTP input stream response. The PeopleSoft target connector logs the MIME response that it received from the integration engine.

Message Logging in Listening Connectors

Message logging in a listening connector occurs:

  • At the point where the request enters the system.

    The connector logs the request in the format in which the sending system delivers it. For example, the HTTP listening connector logs the exact HTTP input stream request. The PeopleSoft listening connector logs the MIME request that it received from the integration engine.

  • Following the delivery of a response to the requestor system.

    The connector logs the response in the format in which it was delivered. For example, the HTTP listening connector logs the exact HTTP output stream response. The PeopleSoft listening connector logs the MIME response that it sent back to the integration engine.

Message Logging Methods and Parameters

Invoke the logMessage method for integration gateway message logging:

logMessage(String Description, Object message, int MessageLevel)

Use the following parameters:

Parameter

Description

Description

Specify a description as a string.

Object

Specify the message object. Typically this object is an IBRequest or IBResponse. If another object is passed, the toString method is invoked for the object, and the result is logged.

MessageLevel

Set the relative importance of the information that you are logging. The ig.log.level property setting in the integrationGateway.properties file determines the log level that is currently in effect. If the MessageLevel value that is passed here is less than or equal to the ig.log.level property setting, the message is written to the log file.

Values are:

  • 3: Important information.

  • 4: Standard information.

  • 5: Low-importance information.

The ig.messageLog.filename property in the integrationGateway.properties file determines the log file location.

Error logging captures processing errors that occur in the integration gateway. When an error occurs, the following information is logged:

  • Error level.

  • Description.

  • Message catalog entry information.

  • Stack trace identifying the problem.

  • IBRequest and IBResponse (if available).

The default location of the integration gateway error log is <PIA_HOME>\webserv\<DOMAIN>\applications\peoplesoft\PSIGW.war\errorLog.html.

Change the location of the log in the integrationGateway.properties file.

Error Logging Methods and Parameters

Invoke the logError method for integration gateway error logging:

logError (String Description, IBRequest, IBResponse, int ErrorLevel, Throwable)

Use the following parameters:

Parameter

Description

Description

Specify a description as a string.

IBRequest

Specify the IBRequest for this transaction, if available. If not available, pass Null.

IBResponse

Specify the IBResponse for this transaction, if available. If not available, pass Null.

ErrorLevel

Specify whether the log is written to permanent storage. This determines the severity of the error. The ig.log.level property in the integrationGateway.properties file determines the log level that is currently in effect. If the ErrorLevel value that is passed here is less than or equal to the ig.log.level property setting, the error is written to the log file.

Values are:

  • 100: Language exception.

  • 1: Standard gateway exception.

  • 2: Warning.

The ig.errorLog.filename property in the integrationGateway.properties file determines the log file location.

Throwable

Specify the Java exception or error that is associated with the error. This is used to log the stack trace that is associated with the error.

The gateway manager and delivered listening connectors feature built-in error logging that invokes the logError method. The delivered target connectors do not feature built-in error logging, and instead generate errors to the gateway manager or listening connectors, where they are handled or logged.