Return-Path: Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@www.apache.org Received: (qmail 74807 invoked from network); 27 Apr 2004 13:39:12 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 27 Apr 2004 13:39:12 -0000 Received: (qmail 31395 invoked by uid 500); 27 Apr 2004 13:39:06 -0000 Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@jakarta.apache.org Received: (qmail 31373 invoked by uid 500); 27 Apr 2004 13:39:05 -0000 Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Commons HttpClient Project" Reply-To: "Commons HttpClient Project" Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 31342 invoked from network); 27 Apr 2004 13:39:04 -0000 Received: from unknown (HELO mtagate4.de.ibm.com) (195.212.29.153) by daedalus.apache.org with SMTP; 27 Apr 2004 13:39:04 -0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate4.de.ibm.com (8.12.10/8.12.10) with ESMTP id i3RDd5Pk098864 for ; Tue, 27 Apr 2004 13:39:05 GMT Received: from d12ml067.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i3RDd4iI151112 for ; Tue, 27 Apr 2004 15:39:05 +0200 In-Reply-To: To: "Commons HttpClient Project" MIME-Version: 1.0 Subject: RE: customizing debugging levels per httpclient instance X-Mailer: Lotus Notes Release 6.0 September 26, 2002 From: Roland Weber X-MIMETrack: S/MIME Sign by Notes Client on Roland Weber/Germany/IBM(Release 6.0|September 26, 2002) at 27.04.2004 15:39:28, Serialize by Notes Client on Roland Weber/Germany/IBM(Release 6.0|September 26, 2002) at 27.04.2004 15:39:28, Serialize complete at 27.04.2004 15:39:28, S/MIME Sign failed at 27.04.2004 15:39:28: The cryptographic key was not found, Serialize by Router on D12ML067/12/M/IBM(Release 6.0.2CF2|July 23, 2003) at 27/04/2004 15:39:05, Serialize complete at 27/04/2004 15:39:05 Message-ID: Date: Tue, 27 Apr 2004 15:39:03 +0200 Content-Type: multipart/alternative; boundary="=_alternative 004B0624C1256E83_=" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --=_alternative 004B0624C1256E83_= Content-Type: text/plain; charset="US-ASCII" Hi Gareth, thanks a lot for the pointer. The concept is very close to what I need. The problem is that I'm not using log4j, since the application uses a different logging framework. But I might borrow the idea of attaching some context to the thread in my application. thanks again, Roland Gareth_Davies@tdwh.co.uk 27.04.2004 15:20 Please respond to "Commons HttpClient Project" To: "Commons HttpClient Project" cc: Subject: RE: customizing debugging levels per httpclient instance Best solution I've come up with for this sort of thing is to use Nested Diagnostic Context's (NDC) in log4j have a look at the section on them in: http://logging.apache.org/log4j/docs/manual.html Not quite what you want I know, but it will give you something to grep on. Gareth Roland Weber To "Commons HttpClient Project" 27/04/2004 14:12 cc Please respond to "Commons Subject HttpClient RE: customizing debugging levels Project" per httpclient instance Hi Oleg, I had a similar problem when I started using HttpClient last year. Not thread-based though. I'm in a servlet engine, so I don't know which thread will be processing the request that uses HttpClient. I'd like to have different log settings per HttpClient instance, but that's not possible because they all use the same static loggers. It's not a big issue for me now, since I have enough application level tracing. But if someone has an idea how this problem could be solved once and for all, it might be worth considering for 4.0. Like creating a logger for each HttpClient instance instead of each implementation class. Or falling back to the class logger only if no instance logger is configured in the params. cheers, Roland "Kalnichevski, Oleg" 26.04.2004 18:34 Please respond to "Commons HttpClient Project" To: "Commons HttpClient Project" cc: Subject: RE: customizing debugging levels per httpclient instance Jorrit, HttpClient relies on commons-logging toolkit to do all its logging. The commons-logging itself is merely an abstraction layer intended to provide a uniform interface to different logging toolkits. If there is a toolkit capable of assigning different appenders on per thread basis, then HttpClient can be configured to take advantage of it. To my best knowledge Log4j cannot assign individual appenders to different threads within the same application (within the same class loader context rather). You may consider evaluating a different logging toolkit that provides such a feature, or file a feature request with the Log4j project. Oleg -----Original Message----- From: Jorrit Kronjee [mailto:httpclient@nospam.wafel.org] Sent: Monday, April 26, 2004 13:19 To: commons-httpclient-dev@jakarta.apache.org Subject: customizing debugging levels per httpclient instance Hello, I have an application consisting of two threads. Both threads have an own instance of httpclient and use it for different things. I would like to see the wire of one of the threads, but suppress the other. I use log4j. log4j can set the debugging level (trace or not) based on package/class names. I was wondering if it's possible to set the class name for http client, so i can customize my debugging per thread. Or perhaps I'm not understanding it correctly. If this is not possible, I would like to make this a feature request. Thanks in advance, Jorrit Kronjee --------------------------------------------------------------------- To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org *************************************************************************************************** The information in this email is confidential and may be legally privileged. Access to this email by anyone other than the intended addressee is unauthorized. If you are not the intended recipient of this message, any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you are not the intended recipient, please reply to or forward a copy of this message to the sender and delete the message, any attachments, and any copies thereof from your system. *************************************************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org --=_alternative 004B0624C1256E83_=--