How to enable debug level log for TIBCO ActiveMatrix BusinessWorks™ Plug-in for WebSphere MQ 8.5.1

How to enable debug level log for TIBCO ActiveMatrix BusinessWorks™ Plug-in for WebSphere MQ 8.5.1

book

Article ID: KB0080261

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for IBM MQ 8.5.1

Description

When following the user guide to add below logger in the logback.xml file, no debug level log is written in the log. An internal Jira ticket has been created to record this.
<logger name="com.tibco.bw.palette.bwmq.runtime">
   <level value="DEBUG"/>
</logger>

Issue/Introduction

How to enable debug level log for TIBCO ActiveMatrix BusinessWorks™ Plug-in for WebSphere MQ 8.5.1

Resolution

Logging in MQ plugin is sparse by design because any requirement for detailed logging can be satisfied via the IBM MQ detailed trace facilities.

Using a simple process that does a put and a get like this:
 

 

 

To do basic debug logging for all palette activities create a logback.xml node like this:

 

<logger name="com.tibco.bw.palette.mq">

    <level value="DEBUG"/>

 </logger>

 

 

Another way is to log the MQ activities for a particular application:

 <logger name="BwmqSample">

    <level value="DEBUG"/>

 </logger>

 

Where BwmqSample is the module name for a particular application module.  Note that an application can have multiple modules and you can log the MQ activities by module this way.

 

To log with a little more granularity you can log just a particular activity in a module like this:

 <logger name="BwmqSample.Put">

    <level value="DEBUG"/>

 </logger>

 

This will log only the put activity in this module.  If there are multiple activities with the same name they will all be logged.


 

A fourth way to accomplish logging is to place a unique logger name in the  “Logger Name” field of the activity. For instance:
<logger name="really.just.this.activity.logger">

    <level value="DEBUG"/>

 </logger>

 

This will log any MQ activity that has this string in its logger field.  So in this way you can get basic logging of several related activities scattered all over an application.


 

Detailed Tracing:

 

The IBM WebSphere MQ client has a detailed tracing feature.  Because this feature exists I have left off doing detailed message contents tracing of the plugin itself.  This tracing is enabled by placing the following system property on the vm running the application:

 

-Dcom.ibm.mq.commonservices=/home/wcn00/Downloads/wmqtrace/wmq.trace

 

Where the file  is the trace configuration file for MQ.  The file looks like:

#

# Base WebSphere MQ diagnostics are disabled #                                                                                                                                Diagnostics.MQ=enabled

#

Diagnostics.Java=wmqjavaclasses

#

Diagnostics.Java.Trace.Detail=medium

#  

Diagnostics.Java.Trace.Destination.File=enabled                                                                                                                       Diagnostics.Java.Trace.Destination.Console=disabled

# Diagnostics.Java.Trace.Destination.Pathname=/home/wcn00/Downloads/wmqtrace/trace.txt

#                                                                                                                                                                                Diagnostics.Java.FFDC.Destination.Pathname=/home/wcn00/Downloads/wmqtrace

These parms are explained at:

https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.tro.doc/q039750_.htm

 

If running on Windows the file names must be encoded like:  c:\\ffdcdir\\subdir\\fname.trace

 

Note that the Diagnostics.Java.Trace.Destination.Pathname specifies the file to append trace data to.  Trace detail with tracing set to “high” can be very large, be sure you have this disk space available.