The WebSphere MQ Everyplace system has a built-in tracing capability for its own runtime tracing, and this tracing capability is also available to the application programmer.
An application needs to explicitly start and stop the trace using the MQeTraceCmd()API.
#include <hmq.h> MQEHSESS hSess; MQEINT32 compcode, reason; hSess =MQeInitialize("MyAppsName",&compcode, &reason); /*Start the trace */ MQeTraceCmd (hSess, MQE_TRACE_CMD_START, 0, &compcode, &reason); MQeTraceCmd (hSess, MQE_TRACE_CMD_SET_MASK, MQE_TRACE_OPTION_SYS_ERROR, + MQE_TRACE_OPTION_APP_MSG, &compcode, &reason); MQeTrace(hSess, MQTS("Starting MQe...")); MQeTrace(hSess, MQTS("This is an information trace message")); /*Stop the trace */ MQeTraceCmd (hSess, MQE_TRACE_CMD_STOP, 0, &compcode, &reason); /* Terminate the MQe session */ MQeTerminate (hSess, &compcode, &reason);