can not turn off log under HttpClient

2004-10-20 Thread jrlecq
Hello,

When I read trace in my catalina.out, I find this information many many time
:
 20 oct. 2004 10:21:27 org.apache.commons.httpclient.HttpMethodBase
processRedirectResponse
 INFO: Redirect requested but followRedirects is disabled

I read carefully the HttpClient user guide about logging and Apache common
logging guide, but I don't find how turn off thoses traces.

I tried this but it s don' t work :
MyClass{
/** logging **/
private static Log log1 =
LogFactory.getLog(org.apache.commons.logging.Log);
private static Log log2 =
LogFactory.getLog(org.apache.commons.logging.impl.SimpleLog);
private static Log log3 =
LogFactory.getLog(org.apache.commons.logging.simplelog.log.httpclient.wire
);
private static Log log4 =
LogFactory.getLog(org.apache.commons.logging.simplelog.log.org.apache.commo
ns.httpclient);
private static Log log5 =
LogFactory.getLog(org.apache.commons.logging.simplelog.defaultlog);
...

  MyClassConstructor(){
log1.isFatalEnabled();
log2.isFatalEnabled();
log3.isFatalEnabled();
log4.isFatalEnabled();
log5.isFatalEnabled();
...
  }
}

If someone have an idea ...

Thx



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: can not turn off log under HttpClient

2004-10-20 Thread Ortwin Glück
If you use Log4J, put the following in your log4j.properties:
log4j.rootLogger=ERROR, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%c] %m%n
Alternatively you can use System properties to control commons-logging:
System.setProperty(org.apache.commons.logging.Log, 
org.apache.commons.logging.impl.SimpleLog);
System.setProperty(org.apache.commons.logging.simplelog.showdatetime, 
true);
System.setProperty(org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient, 
error);

O.
[EMAIL PROTECTED] wrote:
Hello,
When I read trace in my catalina.out, I find this information many many time
:
20 oct. 2004 10:21:27 org.apache.commons.httpclient.HttpMethodBase
processRedirectResponse
INFO: Redirect requested but followRedirects is disabled

I read carefully the HttpClient user guide about logging and Apache common
logging guide, but I don't find how turn off thoses traces.
I tried this but it s don' t work :
MyClass{
/** logging **/
private static Log log1 =
LogFactory.getLog(org.apache.commons.logging.Log);
private static Log log2 =
LogFactory.getLog(org.apache.commons.logging.impl.SimpleLog);
private static Log log3 =
LogFactory.getLog(org.apache.commons.logging.simplelog.log.httpclient.wire
);
private static Log log4 =
LogFactory.getLog(org.apache.commons.logging.simplelog.log.org.apache.commo
ns.httpclient);
private static Log log5 =
LogFactory.getLog(org.apache.commons.logging.simplelog.defaultlog);
...
  MyClassConstructor(){
log1.isFatalEnabled();
log2.isFatalEnabled();
log3.isFatalEnabled();
log4.isFatalEnabled();
log5.isFatalEnabled();
...
  }
}
If someone have an idea ...
Thx

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
 _
 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: can not turn off log under HttpClient

2004-10-20 Thread jrlecq
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

-Message d'origine-
De : Ortwin Glück [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 20 octobre 2004 10:45
À : Commons HttpClient Project
Objet : Re: can not turn off log under HttpClient


If you use Log4J, put the following in your log4j.properties:

log4j.rootLogger=ERROR, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%c] %m%n

Alternatively you can use System properties to control commons-logging:

System.setProperty(org.apache.commons.logging.Log,
org.apache.commons.logging.impl.SimpleLog);
System.setProperty(org.apache.commons.logging.simplelog.showdatetime,
true);
System.setProperty(org.apache.commons.logging.simplelog.log.org.apache.comm
ons.httpclient,
error);


O.
[EMAIL PROTECTED] wrote:

 Hello,

 When I read trace in my catalina.out, I find this information many many
time
 :

20 oct. 2004 10:21:27 org.apache.commons.httpclient.HttpMethodBase

 processRedirectResponse

INFO: Redirect requested but followRedirects is disabled


 I read carefully the HttpClient user guide about logging and Apache common
 logging guide, but I don't find how turn off thoses traces.

 I tried this but it s don' t work :
 MyClass{
 /** logging **/
   private static Log log1 =
 LogFactory.getLog(org.apache.commons.logging.Log);
   private static Log log2 =
 LogFactory.getLog(org.apache.commons.logging.impl.SimpleLog);
   private static Log log3 =

LogFactory.getLog(org.apache.commons.logging.simplelog.log.httpclient.wire
 );
   private static Log log4 =

LogFactory.getLog(org.apache.commons.logging.simplelog.log.org.apache.commo
 ns.httpclient);
   private static Log log5 =
 LogFactory.getLog(org.apache.commons.logging.simplelog.defaultlog);
   ...

   MyClassConstructor(){
 log1.isFatalEnabled();
 log2.isFatalEnabled();
 log3.isFatalEnabled();
 log4.isFatalEnabled();
 log5.isFatalEnabled();
 ...
   }
 }

 If someone have an idea ...

 Thx



 -
 To unsubscribe, e-mail:
[EMAIL PROTECTED]
 For additional commands, e-mail:
[EMAIL PROTECTED]

--
  _
  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:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: can not turn off log under HttpClient

2004-10-20 Thread Ortwin Glück

[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: can not turn off log under HttpClient

2004-10-20 Thread jrlecq
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:[EMAIL PROTECTED]
Envoyé : mercredi 20 octobre 2004 11:07
À : Commons HttpClient Project
Objet : Re: can not turn off log under HttpClient




[EMAIL PROTECTED] 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:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]