commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Kruggel <j...@wispa.de>
Subject HttpClient is logging on INFO-level - how to change to ERROR?
Date Fri, 05 Jan 2007 17:03:48 GMT
Hi list,

I use HttpClient 2.0 that - according to the documentation - depends on
commons-logging-1.1 which I installed and added to CLASSPATH. Actually I
fail to change the log-level and got stuck with the search, where I can
change from INFO to ERROR.

My first glance in the logging-documentation made me try two different
lines. The first does have no effect on the HttpClient (it still is
logging on INFO-level) and the second line seems to confuse the
logging-factory.

System.setProperty("org.apache.commons.logging.simplelog.defaultlog", "error");

// no effect, still getting messages such as
//
// 05.01.2007 17:40:45 org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
// INFO: basic authentication scheme selected

System.setProperty("org.apache.commons.logging.Log", "error");

// crashes a few lines later
//
// java.lang.ExceptionInInitializerError
//         at HttpPasswordTester.main(HttpPasswordTester.java:23)
// Caused by: org.apache.commons.logging.LogConfigurationException: User-specified log class
'error' cannot be found or is not useable.
//         at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:798)
//         at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:601)
//         at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:333)
//         at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:307)
//         at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:645)
//         at org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:65)
//         ... 1 more

Can anybody tell me where or even how I can change the log-level for the
HttpClient?

Best regards,

Christian


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


Mime
View raw message