hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <jrl...@easyvoyage.fr>
Subject RE: can not turn off log under HttpClient
Date Wed, 20 Oct 2004 09:20:02 GMT
Ok it's working :
I write this on the top of my main class and the boring trace disepear :
static{
		System.setProperty("org.apache.commons.logging.Log","org.apache.commons.lo
gging.impl.SimpleLog");
		System.setProperty("org.apache.commons.logging.simplelog.showdatetime","tr
ue");
		System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.co
mmons.httpclient","error");
	}

Thkx a lot


-----Message d'origine-----
De : Ortwin Glück [mailto:ortwin.glueck@nose.ch]
Envoyé : mercredi 20 octobre 2004 11:07
À : Commons HttpClient Project
Objet : Re: can not turn off log under HttpClient




jrlecq@easyvoyage.fr wrote:

> I have nothing against log4J, but I can not add easyly a new packagge in
my
> application (someone else has to decide it...).
> So I test with "System properties". But the log message is traced again :
> 20 oct. 2004 10:55:17 org.apache.commons.httpclient.HttpMethodBase
> processRedirectResponse
> INFO: Redirect requested but followRedirects is disabled

As the logging guide states:

Note: The system properties must be set before a reference to any
Commons Logging class is made.

So set those properties as early as possible in your application or set
them on the command line withe the -D option of the JVM.

O.

--
  _________________________________________________________________
  NOSE applied intelligence ag

  ortwin glück                      [www]      http://www.nose.ch
  software engineer
  hardturmstrasse 171               [pgp id]           0x81CF3416
  8005 zürich                       [office]      +41-1-277 57 35
  switzerland                       [fax]         +41-1-277 57 12

---------------------------------------------------------------------
To unsubscribe, e-mail:
commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail:
commons-httpclient-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message