Return-Path: Delivered-To: apmail-ws-general-archive@www.apache.org Received: (qmail 48796 invoked from network); 18 Aug 2005 13:03:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Aug 2005 13:03:31 -0000 Received: (qmail 62192 invoked by uid 500); 18 Aug 2005 13:03:10 -0000 Delivered-To: apmail-ws-general-archive@ws.apache.org Received: (qmail 61678 invoked by uid 500); 18 Aug 2005 13:03:07 -0000 Mailing-List: contact general-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: general@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list general@ws.apache.org Received: (qmail 61665 invoked by uid 99); 18 Aug 2005 13:03:07 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2005 06:03:04 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 2A9DADF for ; Thu, 18 Aug 2005 15:03:03 +0200 (CEST) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Apache Wiki To: general@ws.apache.org Date: Thu, 18 Aug 2005 13:03:03 -0000 Message-ID: <20050818130303.13099.50099@ajax.apache.org> Subject: [Ws Wiki] Update of "FrontPage/Axis/ViewSOAPMessages" by DavanumSrinivas X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dear Wiki user, You have subscribed to a wiki page or wiki category on "Ws Wiki" for change notification. The following page has been changed by DavanumSrinivas: http://wiki.apache.org/ws/FrontPage/Axis/ViewSOAPMessages New page: == Using the log4j system to observe SOAP message == Log4j is an apache project to log run time information. You can use Log4J to observe SOAP message at both client side and server side. More than that, you can also observe other operations Tomcat executes. Be default, this system is not available. You may have already noticed the warn message about the loggers when you run axis applications. First, save the code in the following block into a file name log4j.properties. This log4j configuration file is for logging the SOAP relevant information in file “axis.log”. {{{ # Set root logger level to WARN and its only appender to A1. log4j.rootLogger=WARN, A1 # show DEBUG for SOAPPart method log4j.logger.org.apache.axis.SOAPPart=DEBUG # A1 is set to be a ConsoleAppender. # log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1=org.apache.log4j.FileAppender log4j.appender.A1.File=axis.log # A1 uses PatternLayout. log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n }}} Second, use it for logging client side SOAP messages: Copy log4j.properties in the directory where the java command runs. Java will find the configuration file and use it automatically. E.g. {{{ java samples.stock.GetQuote -uuser1 -wpass1 XXX }}} Or use the option –D to indicate the configuration file: {{{ java -Dlog4j.configuration=file:log4j.properties samples.stock.GetQuote -uuser1 -wpass1 XXX }}} You will find the file axis.log at the same directory which records the SOAP messages. Third, use it for logging server side SOAP messages: Copy the log4j.properties into the directory where axis engine starts: {{{ %AXIS_START_DIR%/axis/WEB-INF/classes }}} You will find the log file at the directory where you start the tomcat server. On my computer is at {{{ %CATALINA_HOME%/bin }}} ORIGINAL ARTICLE: http://personal.nbnet.nb.ca/dragonfy/ebcourse/Lecture3/Log4j.pdf