Return-Path: Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@www.apache.org Received: (qmail 37377 invoked from network); 22 Jun 2004 04:15:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 22 Jun 2004 04:15:12 -0000 Received: (qmail 27835 invoked by uid 500); 22 Jun 2004 04:15:32 -0000 Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@jakarta.apache.org Received: (qmail 27675 invoked by uid 500); 22 Jun 2004 04:15:31 -0000 Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Commons HttpClient Project" Reply-To: "Commons HttpClient Project" Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 27642 invoked by uid 99); 22 Jun 2004 04:15:31 -0000 Received: from [192.18.42.13] (HELO nwkea-mail-1.sun.com) (192.18.42.13) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 21 Jun 2004 21:15:31 -0700 Received: from phys-soms-1 ([129.158.80.181]) by nwkea-mail-1.sun.com (8.12.10/8.12.9) with ESMTP id i5M4EqJ6028165 for ; Mon, 21 Jun 2004 21:14:52 -0700 (PDT) Received: from conversion-daemon.soms-mail1.Aus.Sun.COM by soms-mail1.Aus.Sun.COM (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0HZO00601ZNG65@soms-mail1.Aus.Sun.COM> (original mail from Darren.Jiang@Sun.COM) for commons-httpclient-dev@jakarta.apache.org; Tue, 22 Jun 2004 14:14:52 +1000 (EST) Received: from sun.com (dhcp-mel06-87-75.Aus.Sun.COM [129.158.87.75]) by soms-mail1.Aus.Sun.COM (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTPA id <0HZO0093TZSSWY@soms-mail1.Aus.Sun.COM> for commons-httpclient-dev@jakarta.apache.org; Tue, 22 Jun 2004 14:14:52 +1000 (EST) Date: Tue, 22 Jun 2004 14:14:50 +1000 From: darren jiang Subject: Re: Resend: disable httpclient logging In-reply-to: <40D68CC1.2010507@nose.ch> Sender: Darren.Jiang@Sun.COM To: Commons HttpClient Project Message-id: <40D7B23A.6020801@sun.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 8BIT X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4.1) Gecko/20031008 References: <40C02338.9020708@sun.com> <40D67B75.7000108@sun.com> <40D68CC1.2010507@nose.ch> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hello Ortwin, thank you for your help to indentify the reason for this. I did a configuration in my program to use the passed in logging.properties file. I put my code here. --------------------------------------------------------- public static void main(String[] args) { if(!checkParameters(args)) { System.out.println("parameter error:"); System.out.println("parameter: ALL|RENEWSUB|CANCELSUB"); System.exit(-1); } // prepare the system properties String logFile = System.getProperty("log.file"); String logConfigFile = System.getProperty("java.util.logging.config.file"); System.out.println("log File = " + logFile); System.out.println("log ConfigFile = " + logConfigFile); ........ // config log4j system PropertyConfigurator.configure(logConfigFile); //use NDC to format log4 entries NDC.clear(); NDC.push(Constants.APPLICATION_DEBUG); --------------------------------------------------------- so the program should use log4j logging API in my program, and the configuration parameters is in my passed in BatchLog.properties then the program should disable the debug logging for org.apache.commons package and sub package. but it did not stop the debugging, particular the WIRE package. many thanks! Darren Jiang Ortwin Gl�ck wrote: > > > darren jiang wrote: > >> additional info: >> >> 1. this is a standalone java program, >> >> 2. the script to launch the java process as follows: >> >> --------------------- >> >> #!/bin/sh >> CDS_HOME=/opt/cvm >> CDS_RUNTIME=$CDS_HOME/deployment/cvm >> echo "CDS_HOME =$CDS_HOME" >> echo "CDS_RUNTIME=$CDS_RUNTIME" >> #classpath for CDS_RUNTIME >> CLASSPATH=../.:$CDS_HOME/enhancements/lib/commons-httpclient-2.0.jar:$CDS_RUNTIM >> >> E/lib/struts-plus-apache-commons.jar:$CDS_RUNTIME/lib/log4j-1.2.8.jar:$CDS_RUNTI >> >> ME/lib/cdslib/cdsapi.jar:$CDS_RUNTIME/lib/cdslib/foundation.jar:$CDS_RUNTIME/ser >> >> vice/postpaidservice/lib/postpaidservice.jar:$CDS_HOME/enhancements/lib/infranet >> >> /cdk.jar:$CDS_HOME/enhancements/lib/infranet/pcm.jar:$CDS_HOME/enhancements/lib/ >> >> infranet/pcmext.jar:$CDS_HOME/enhancements/enhancements.jar:$CDS_HOME/enhancemen >> >> ts > > > > The classpath contains Log4J. So Log4J will be used by commons-logging. > >> >> #classpath for deactive Account /cancel subscription >> CLASSPATH=$CLASSPATH:$CDS_RUNTIME/lib/classes12.zip:$CDS_RUNTIME/lib/xerces.jar: >> >> $CDS_RUNTIME/lib/xalan.jar >> echo $CLASSPATH >> $JAVA_HOME/bin/java >> -Djava.util.logging.config.file=/opt/cvm/enhancements/BatchL >> og.properties -cp $CLASSPATH com.telstra.cvm.cancellation.BatchMain $1 >> > > The java.util.logging property will be ignored, since Log4J is > preferred over JDK1.4 logging. > >> -------------------- >> >> 3. in its classpath, it contains both httpclient-20.jar and >> struts-plus-apache-commons.jar > > > I think HttpClient is not shipped with Struts. No problem here. > >> 4. I change the last line to be one of the following: > > > In which file? The default config file for Log4J is log4j.properties > and is expected on the top level of the classpath. If you want to use > a different filename or location you must configure Log4J manually > from within your application. > >> a) log4j.logger.org.apache.commons=ERROR >> >> b) log4j.category.org.apache.commons=ERROR >> >> c) log4j.logger.org.apache.commons.httpclient=ERROR >> >> NONE of them works! >> >> >> ANYONE CAN THINK OF THE REASON? >> >> many thanks! >> >> >> Darren Jiang > > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org