hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: How to use logging abilities of HttpClient?
Date Tue, 10 Apr 2012 13:38:37 GMT
On Tue, Apr 10, 2012 at 03:30:56PM +0200, tommmmmm wrote:
> I tried:
> 
>         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.http",
> "DEBUG");
> 
> System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.wire",
> "ERROR");
> 
> Yes, that is another almost exactly copy-pasted example from the HttpClient
> website. Didn't work.
> 
> The class really isn't big - one main method + couple lines. So I have no
> idea how this could happen quote: "If Commons Logging picked up another
> backend "
> 

How am I supposed to know? It is your stuff.


> Also, there is this thing, that if there was some other backend then the
> line: logger.debug("some test message");  would produce no output at all.
> And since it does, it means it IS HttpClient issue.
> 
> For the record, I am simply using a provided jar from the website (no fancy
> stuff).

Set these settings at the JVM level with -D option

-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
-Dorg.apache.commons.logging.simplelog.showdatetime=true
-Dorg.apache.commons.logging.simplelog.log.org.apache.http=DEBUG

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message