Logging

 

The WebSphere MQ JMS log facility is provided to report serious problems, particularly those that might indicate configuration errors rather than programming errors. By default, log output is sent to the System.err stream, which usually appears on the stderr of the console in which the JVM is run.

We can redirect the output to a file by using a Java™ property that specifies the new location, for example:

java -Djava.library.path=library_path
     -DMQJMS_LOG_DIR=/mydir/forlogs MyJMSProg
where library_path is the path to the WebSphere MQ Java libraries (see The WebSphere MQ Java libraries).

When the log is redirected to a file, it is output in a binary form. To view the log, the utility formatLog (formatLog.bat on Windows systems) is provided, which converts the file to plain text format. The utility is stored in the bin directory of your WebSphere MQ JMS installation. Run the conversion as follows:

formatLog <inputfile> <outputfile>


uj10780_