Hey Christian,
CH> Which implementation do you use for the actual logging?
To be honest: I do not have any idea. Since I did not specify a
particular implementation I do assume that SimpleLog is used. But if so,
these both lines should affect logging:
System.setProperty("org.apache.commons.logging.simplelog.defaultlog", "fatal");
System.setProperty("org.apache.commons.logging.simplelog.showlogname", "true");
Though there shoud be some change in the log-behaviour (according to the
manual you suggested
[http://jakarta.apache.org/commons/logging/commons-logging-1.1/guide.html#A_Quick_Guide_To_Simple_Log])
I still recieve the following log-messages:
06.01.2007 13:37:04 org.apache.commons.httpclient.auth.AuthChallengeProcessor
selectAuthScheme
INFO: basic authentication scheme selected
To me this means: neither the log-level has changed nor the log-name in
displayed - if I set the properties correct (which seems undoubtedly to
me) SimpleLog is *not* used.
So an other question is: How can I determine which log-implementation
my HttpClient actually does use?
Thanks in advance and kind regards,
Christian
CH> I guess that you aren't using any, so the default SimpleLog is used. I
CH> think a look at
CH>
http://jakarta.apache.org/commons/logging/commons-logging-1.1/guide.html#A_Quick_Guide_To_Simple_Log
CH> should solve your current problem.
>> System.setProperty("org.apache.commons.logging.Log", "error");
CH> This code does not work since it instructs commons-logging to use a
CH> class "error" as Log implementation.
CH> - Christian
CH> Friday, January 5, 2007, 6:03:48 PM, you wrote:
>> 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: [EMAIL PROTECTED]
>> For additional commands, e-mail:
>> [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]