hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Adams" <st...@drifthost.com>
Subject RE: Log4j with Httpclient 4.x
Date Wed, 04 Jun 2008 07:25:59 GMT
Hi,

I know it's using log4j as its outputting everything via the root category.

But when I try put to it in its own category (log file) it's just not
working.

Any ideas?

-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Monday, 2 June 2008 9:24 PM
To: HttpClient User Discussion
Subject: Re: Log4j with Httpclient 4.x

On 02/06/2008, Steven Adams <steve@drifthost.com> wrote:
> Hi,
>
>  I've been trying to get log4j working with httpclient 4.x.
>
>  My properties file looks like the following..
>
>  ----SNIP----
>  logj4.logger.org.apache.commons.httpclient=DEBUG, httc
>  logj4.logger.org.apache.http.wire=DEBUG, httc
>  logj4.logger.org.apache.http.headers=DEBUG, httc
>
>  log4j.appender.httc =org.apache.log4j.FileAppender
>  log4j.appender.httc.File=logs/httc.log
>  log4j.appender.httc.layout=org.apache.log4j.PatternLayout
>  log4j.appender.httc.layout.ConversionPattern=%p %d{dd MMM yyyy HH:mm:ss}
>  [%t] %c %x - %m%n
>  ----SNIP----
>
>  Any ideas?
>

Is it using log4j logging? Or has it picked some other logger?
If so, the following advice just posted to Commons User list might help:

You could try putting a file named "commons-logging.properties" in your
app's classpath with the following contents:

org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

This will force commons logging to use log4j.

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

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


---------------------------------------------------------------------
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