You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Christopher Cheng <my...@chrishome.com> on 2005/12/27 16:00:07 UTC
logging using log4j
I was trying to log the envelope/payloads of all soap messages to a file
using log4j, but it seems that it doesn't work. Can anybody point out what's
wrong with my configuration?
The following is my entry in commons-logging.properties
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
The following is my log4j.properties:
# Set root category priority to INFO and its only appender to CONSOLE.
# log4j.rootCategory=INFO, CONSOLE, LOGFILE
log4j.rootCategory=INFO, LOGFILE
# Set the enterprise logger category to FATAL and its only appender to
CONSOLE.
log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE, LOGFILE
#log4j.logger.org.apache.axis.enterprise=FATAL, LOGFILE
# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=DEBUG
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n
# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=c:/axis.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.Threshold=DEBUG
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
Re: logging using log4j
Posted by Kent Tong <ke...@cpttm.org.mo>.
Christopher Cheng <mylist <at> chrishome.com> writes:
> I was trying to log the envelope/payloads of all soap messages
> to a file using log4j, but it seems that it doesn’t work. Can anybody
> point out what’s wrong with my configuration?
If you need it on the client side, set the log level to debug
(but it will log a lot other info).
If you just want the soap mesages, use the
org.apache.axis.handlers.LogHandler.
--
Author of a book for learning Apache Axis (http://www.agileskills2.org/DWSAA)