Tracing programs
The WebSphere MQ JMS trace facility is provided to help IBM staff to diagnose customer problems.
Trace is disabled by default, because the output rapidly becomes large, and is unlikely to be of use in normal circumstances.
If you are asked to provide trace output, enable it by setting the Java™ property MQJMS_TRACE_LEVEL to one of the following values:
- on
- traces WebSphere MQ JMS calls only
- base
- traces both WebSphere MQ JMS calls and the underlying WebSphere MQ base Java calls
For example:
java -Djava.library.path=library_path -DMQJMS_TRACE_LEVEL=base MyJMSProgwhere library_path is the path to the WebSphere MQ Java libraries (see The WebSphere MQ Java libraries).To disable trace, set MQJMS_TRACE_LEVEL to off.
By default, trace is output to a file named mqjms.trc in the current working directory. We can redirect it to a different directory by using the Java property MQJMS_TRACE_DIR. For example:
java -Djava.library.path=library_path -DMQJMS_TRACE_LEVEL=base -DMQJMS_TRACE_DIR=/somepath/tracedir MyJMSProg
uj10770_