Wednesday, May 5, 2010

Config log4j to print SOAP content with AXIS2

log4j.rootLogger=debug

# set to false to turn off log4j debug statements
log4j.debug=true

# Turns off logging in log4j
# log4j.threshold=OFF

# set standard out appender.
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%-4r [%d{ISO8601}] [%t] %-5p %c %x - %m%n

# configure httpclient to print SOAP content
log4j.logger.httpclient=debug,stdout
log4j.logger.org.apache.commons.httpclient=debug,stdout

2 comments:

  1. Thank you, exactly what I needed.

    ReplyDelete
  2. My requirement is like to enable or disable SOAP request/response logging in Httpclient to log for a particular SOAP service, i can disable entire httpclient logging by log4j.logger.httpclient.wire=OFF, but i need an option like to disable logging in httpclient for a particular service is there any approach to achieve this.

    ReplyDelete