WSO2 ESB 4.7.0 or higher versions.
1. Open log4j.properties file.
log4j.properties file is located in <EBB_HOME>/repository/conf directory.
2. Un-comment the following entry.
log4j.logger.org.apache. synapse.transport.http.wire= DEBUG
3. Save the file and restart the server to affect the changes.
In the older versions, it is bit different than the new versions.
For ESB 4.6.0 :
log4j.logger.org.apache. synapse.transport.passthru. wire=DEBUG
For ESB 4.5.1 or previous versions :
log4j.logger.org.apache. synapse.transport.nhttp.wire= DEBUG
To see HTTP headers and messages of Callout mediator/MessageProcessor.
1. Open log4j.properties file.
2. Un-comment the following two entries.
log4j.logger.httpclient.wire. header=DEBUG
log4j.logger.httpclient.wire. content=DEBUG
3. Save the file and restart the server to affect the changes.
NOTE: Wire logs should enable only for a troubleshooting purposes, not recommended for the systems in the production environment.