How to have separate log files per application in BusinessWorks

Emmanuel Marchiset
3 min readDec 28, 2023

--

In BusinessWorks 6.X it is possible to deploy multiple applications in an appspace and then to have at run time multiple applications running in the same appnode.

In the default configuration all the running applications log messages are going to the appnode log file ‘bwappnode.log’ located in the target appnode log directory (<TIBCO_HOME>/bw/6.X/domains/<DOMAIN_NAME>/appnodes/<APPSPACE_NAME>/<APPNODE_NAME>/log).

In order to ease application trouble shooting it is possible in recent BusinessWorks releases, precisely since BusinessWorks 6.6.0, to have a separate log file for each application.

This article is to explain how to set-up such configuration and the limitations to be considered.

How to configure an appnode to have separate log files per application

This can be done with the following:

. Go to the target appnode directory <TIBCO_HOME>/bw/6.X/domains/<DOMAIN_NAME>/appnodes/<APPSPACE_NAME>/<APPNODE_NAME>

. Edit the config.ini file to add the following property:
bw.engine.separate.logs.by.app=true

bw.engine.separate.logs.by.app property added in an appnode config.ini file

. Edit the logback.xml file to add the following tag in the root logger definition:
<appender-ref ref=”APPLICATION-FILE”/>

Root logger configured for logging in separate application log files

. Restart the appnode

With this configuration application logfiles are written next to the bwappnode.log file in the target appnode log directory. The application log file names are in the form <application_name>.application.log.

Application log files in the appnode log folder

It is possible to add some loggers configured with the DEBUG level in the configuration above by including the following tag in their definition:

<appender-ref ref=”APPLICATION-FILE”/>

For example it is possible to add the DEBUG trace of the REST/JSON palette in the application log file using the following logger definition:

REST / JSON palette DEBUG logger configured for separate application log files

It is also possible to control log messages destination at logger level, you can refer to the BusinessWorks documentation for more details.

Limitations to be considered

. Application start and stop messages (Starting, Started, Stopping, Stopped,...) remain in the appnode log file

. Third party loggers, like for example the apache and jetty loggers, do not support logging in separate application log files. The related log messages remain in the appnode log file

. When multiple versions of the same application are deployed in the same appspace the logs of the different versions of the application are going to the same file

Since BusinessWorks 6.10 it is possible to have the full application version (major.minor.patch) included in the log by adding the following property in the appnode config.ini file:
bw.frwk.version.format=true

Reference elements

BusinessWorks documentation:

https://docs.tibco.com/pub/activematrix_businessworks/6.10.0/doc/html/Default.htm#administration/application-logging.htm

Article explaining how to configure logging at activity level:

https://emarchiset.medium.com/how-to-enable-activity-level-logging-in-businessworks-6-x-2ed2fef9b716

--

--

Emmanuel Marchiset

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