Friday, December 30, 2011

Enabling logging for various components in WSO2 BPS

This blog post explains how to log the messages come into and sent out from WSO2 BPS server.
This feature is extensively used in BPEL development to figure out the problems in the message sequences and in latency analysis during BPEL process invocations.

Tested Environment
     wso2bps-2.1.2

Instructions
  1. Add the following entries to the $CARBON-HOME/lib/log4j.properties
        log4j.logger.org.apache.ode.bpel.messagetrace=TRACE
        log4j.logger.org.wso2.carbon.bpel.messagetrace=TRACE
  2. Then the preferred log4j appender should be configured such that it has a threshold of TRACE level. If CARBON_LOGFILE is the log4j appender, it should be changed as follows. By default this is set to DEBUG.
        eg - log4j.appender.CARBON_LOGFILE.threshold=TRACE
  3. Then re-start the WSO2 BPS server.
  4. The log files can be found as $CARBON-HOME/repository/logs/wso2carbon.log 
Note - You can configure this via Management console as well.

1 comment:

Unknown said...

So How would log a message inside a BPEL ?