How to enable activity level logging in BusinessWorks 6.X and BusinessWorks Container Edition

Emmanuel Marchiset
5 min readDec 5, 2021

This article explain how to enable activity level logging both while debugging applications in Studio and at runtime, and also list a number of useful XML tags to debug BusinessWorks applications.

Explanations on how to increase the number of lines kept in the Eclipse Console are also provided.

Enabling activity logging while in debug mode (using Studio)

This can be done with the following:

. Navigate to the <TIBCO_HOME>\bw\6.X\config\design\logback directory and open the logback.xml file
. Go to the User loggers section
. Add the logging tags you want to use, for example:

Editing the design time logback.xml file to add rest / json palette debugging

. Save the file and restart the Debugger

Note that the logback.xml file used by Studio in a debug session can be defined using the following approach:

. Display the Debug Configurations panel using the Run -> Debug Configuration menu
. In the panel open the ‘Advanced’ tab
. The target logback.xml file is defined in the ‘Logging configuration’ field:

Advanced tab of the BusinessWorks Debug Configurations panel

Note that a logback_leveldebug.xml file is provided, using this file all BusinessWorks activities and resources are running with log level set to DEBUG.

Enabling activity logging in runtime mode

This can be done with the following:

. Navigate to the <TIBCO_HOME>\bw\6.X\domains\<YOUR_DOMAIN_NAME>\appnodes\<YOUR_APPSPACE_NAME>\<YOUR_APPNODE_NAME> directory and open the logback.xml file

. Go to the User loggers section

. Add the logging tags you want to use, for example:

Editing an appnode logback.xml file to add jms palette debugging

. Save the file
. The change will be taken into account in the next minute by the appnode (there is no need to restart the appnode)

Useful XML tags to debug BusinessWorks applications

# HTTP Logging

<logger name=”org.apache.http”>
<level value=”DEBUG”/>
</logger>
<logger name=”org.eclipse.jetty”>
<level value=”DEBUG”/>
</logger>
<logger name=”org.glassfish.jersey”>
<level value=”DEBUG”/>
</logger>

# REST Binding Logging

Note : this tag is already present in the default logback.xml file, you just need to update the level

<logger name=”com.tibco.bw.binding.rest.runtime”>
<level value=”DEBUG”/>
</logger>

# SOAP Binding Logging

Note : this tag is already present in the default logback.xml file, you just need to update the level

<logger name=”com.tibco.bw.binding.soap”>
<level value=”DEBUG”/>
</logger>

# JDBC Palette activities logging

<logger name=”com.tibco.bw.sharedresource.jdbc”>
<level value=”DEBUG”/>
</logger>
<logger name=”com.tibco.bw.palette.jdbc”>
<level value=”DEBUG”/>
</logger>
<logger name=”com.tibco.bw.palette.jdbc.runtime.callprocedure”>
<level value=”DEBUG”/>
</logger>

# JMS Palette activities Logging

<logger name=”com.tibco.bw.sharedresource.jms”>
<level value=” DEBUG “/>
</logger>
<logger name=”com.tibco.bw.palette.jms”>
<level value=” DEBUG “/>
</logger>

# File Palette activities Logging

<logger name=”com.tibco.bw.palette.file”>
<level value=”DEBUG”/>
</logger>

# REST JSON Palette activities logging

<logger name=”com.tibco.bw.palette.restjson”>
<level value=”DEBUG”/>
</logger>

# Mail Palette activities logging

<logger name=”com.tibco.bw.palette.mail”>
<level value=”DEBUG”/>
</logger>

#Active Database Plugin
<logger name=”com.tibco.bw.palette.adbplugin.runtime”>
<level value=”DEBUG”/>
</logger>

#MQSeries Plugin

<logger name=”com.tibco.bw.palette.bwmq.runtime”>
<level value=”DEBUG”/>
</logger>

# Kafka Plugin
<logger name=”com.tibco.bw.palette.kafka.runtime”>
<level value=”DEBUG”/>
</logger>

# Oauth Shared Resource
To trace the Oauth shared resource behaviour in stdout you can use the following configuration:

<logger name=”com.tibco.bw.sharedresource.oauth”>
<level value=”TRACE”/>
<appender-ref ref=”STDOUT”/>
</logger>

How to increase the size of the Eclipse Console

. Use the Window -> Preferences menu to display the Preferences panel

. Then go the Run/Debug -> Console section

. Increase the value of the Console Buffer Size:

Updating the Eclipse console buffer size

. Click Apply and OK

How to write the Studio Console log in a file while using the Debugger

. Open the logback.xml file under the <TIBCO_HOME>\bw\6.6\config\design\logback folder.

. Add the ‘FILE’ appender in the top APPENDER section, which writes to file:

<appender name=”FILE” class=”ch.qos.logback.core.FileAppender”>
<file>c:/temp/studio.log</file>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} — %msg%n</pattern>
</encoder>
</appender>

APPENDER section after adding the FILE appender

. Goto the bottom of the file and add a reference to the FILE appender created in the previous step:
<appender-ref ref=”FILE” />

It should look like below :

FILE appender now added to the root configuration

. While running the Studio debugger check the file “c:/temp/studio.log” for the Console output.

How to redirect the BusinessWorks log to stdout at runtime

. Open the logback.xml file under the <TIBCO_HOME>/bw/6.X/domains/<DOMAIN_NAME>/appnodes/<APPSPACE_NAME>/<APPNODE_NAME> folder.

. Add the ‘STDOUT’ appender in the top APPENDER section

<appender name=”STDOUT” class=”ch.qos.logback.core.ConsoleAppender”>
<encoder>
<pattern>%d{HH:mm:ss.SSS} %-5level [%thread] %logger{36} — %msg%n</pattern>
</encoder>
</appender>

APPENDER section after adding the STDOUT appender

. Goto the bottom of the file and add a reference to the STDOUT appender created in the previous step:
<appender-ref ref=”STDOUT” />

It should look like below :

FILE appender now added to the root configuration

. At runtime messages written in the BusinessWorks log should now appear in the appnode stdout log

How to redirect the BusinessWorks stdout to a file in the Debugger

. Select the ‘Run -> Debug Configuration’ menu
. In the ‘Debug Configuration’ panel select the ‘Common’ tab
. Enable the ‘Output File’ option and select a target file

Example of a Debug Configuration

How to redirect an appnode stdout to a file at runtime

In a Linux environment you can do the following:

. Go the appnode ‘bin’ directory
<TIBCO_HOME>/bw/6.8/domains/<YOUR_DOMAIN>/appnodes/<YOUR_APPSPACE>/<YOUR_APPNODE>/bin

. Start the appnode with the following command:
nohup ./startBWAppNode.sh > app.out 2>&1 &

How to see the full application version in the log

When deploying multiple versions of the same application in the same appspace it is useful to have the full application version (major.minor.patch) included in the log.

Since BusinessWorks 6.10 it is possible to do so by adding the following property in the appnode config.ini file:
bw.frwk.version.format=true

--

--

Emmanuel Marchiset

I work as an Architect at TIBCO Software on Integration products. Opinions here are my own.