Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 58179 invoked from network); 4 Jun 2008 07:26:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jun 2008 07:26:51 -0000 Received: (qmail 28019 invoked by uid 500); 4 Jun 2008 07:26:54 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 27995 invoked by uid 500); 4 Jun 2008 07:26:53 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 27984 invoked by uid 99); 4 Jun 2008 07:26:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jun 2008 00:26:53 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [66.90.73.178] (HELO inertia.drifthost.com) (66.90.73.178) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jun 2008 07:25:57 +0000 Received: from [58.165.253.8] (helo=SteveLaptop) by inertia.drifthost.com with esmtpa (Exim 4.69) (envelope-from ) id 1K3nNw-0007Ke-IP for httpclient-users@hc.apache.org; Wed, 04 Jun 2008 17:26:17 +1000 From: "Steven Adams" To: "'HttpClient User Discussion'" References: <1210878055.6422.23.camel@ubuntu> <002b01c8c44c$6779c010$366d4030$@com> <25aac9fc0806020424v45089ea5yc2700f370d27a43d@mail.gmail.com> In-Reply-To: <25aac9fc0806020424v45089ea5yc2700f370d27a43d@mail.gmail.com> Subject: RE: Log4j with Httpclient 4.x Date: Wed, 4 Jun 2008 17:25:59 +1000 Message-ID: <001f01c8c614$4290a380$c7b1ea80$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcjEo0GjPOIZnh8eT/OLsMGiz4xt5QBcL/aw Content-Language: en-au X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - inertia.drifthost.com X-AntiAbuse: Original Domain - hc.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drifthost.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org 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 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