Enabling logging for IBM® WebSphere® MQ Exit

When you use the IBM® WebSphere® MQ Exit for message recording or sift and pass-through, messages might get lost in the process. You can use the logs for IBM® WebSphere® MQ to analyze the cause. This topic outlines how to enable logging for IBM® WebSphere® MQ Exit.

Before you begin

Choose or create a directory for the logs and ensure that the user ID that runs the MQ server process has write access to this directory.


  1. Define operating system environment variables as follows:
    • GH_INTERCEPT_LOG_OPTIONS: You can set this variable to any of the following values:
      • 1, for logging FLOW messages.
      • 2, for logging ERROR messages.
      • 4, for logging DETAIL messages.
      Enter the total of two individual values for combined logs. For example, for logging both ERROR and DETAIL messages, set the variable to 6. To disable logging, set the variable to 0.
    • GH_INTERCEPT_LOG_PATH=MQ Exit log folder
    Important: Exercise caution before setting GH_INTERCEPT_LOG_OPTIONS to 7; this causes all types of messages to be logged, resulting in huge files. Also, remember to disable logging after collecting the required logs, either by removing the environment variables or by setting GH_INTERCEPT_LOG_OPTIONS to 0. If logging is always turned on, the files build up fast and use up your disk space.
  2. Add the environment variables to the system configuration or the user environment that runs the MQ server process.
  3. Restart the MQ server process. This might need a system restart or logging out of the user account and logging in again.
    • The environment variables will be available to the Windows services that run as the system account only after you restart the system.
    • If you are using local environment variables for the user ID that runs the MQ server process, make sure to set the variables for any MQ applications that are locally running on the MQ server.


Logging for IBM® WebSphere® MQ Exit is enabled. A number of files with names such asINTERCEPT.xxx.x.log are created in the specified folder, which you can use to debug the failures during pass-through.