1
votes

In the documentation for WSO2 4.0.2 ESB it says following

The endpoints also have a trace attribute, which turns on detailed trace information for messages being sent to the endpoint. These are available in the trace.log configured via the log4j.properties file (which can be found within lib folder once you unzip wso2 ESB ZIP). Setting the trace log level to TRACE will dump detailed trace information including message payloads.

Can you please share sample log4j snippet to start tracing the just the endpoint. Do I have to enable tracing for proxy service also to enable tracing for end point?

Can you please elaborate? thanks Abhijit

2

2 Answers

5
votes

You can add namespaces of classes to the log4j.properties (in the lib folder of WSO2) that should be traced. With the following line you will enable the tracing of endpoints:

log4j.category.org.apache.synapse.endpoints=TRACE

This enables the tracing for all enpoints (so unfortunately not only for your specific endpoint). By the way this configuration is also crusial to anable tracing or logging for your own classes:

log4j.logger.com.yourCompany=DEBUG

The above enabling of the endpoint tracing will result in logs like this (endpoint pointing to a JMS queue):

[2012-08-17 09:22:13,855] DEBUG - AddressEndpoint Sending message through endpoint : endpoint_9b9ef24d0d136e3e709a6c21cac87806d5d547bc5ba68dc6 resolving to address = jms:/myJMS?transport.jms.DestinationType=topic&transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
0
votes

As FiveO said, you can edit log4j file to see what is going on..But there is another way to enable trace attribute for endpoints.. You simply need to add trace="enable" attribute to your endpoint configuration..

<address uri="http://abc.com" trace="enable">