hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars George <l...@worldlingo.com>
Subject Per thread logging
Date Mon, 30 Jul 2007 21:37:49 GMT
Hi,

While I am at it, we also have the need to log requests on a per thread basis. We have users
using 
our site to translate remote pages. Often it would be great to see what is happening on the
wire for 
one user, i.e. one thread in our Tomcat server. A combined log is literally useless since
we have 
hundreds of concurrent requests, which means the log is a mess of many concurrent external
requests. 
I have since then amended Wire to hold an optional thread-local field of a logger that I hand
in 
using the setParameter() of the HttpClient (or HttpState etc.). If the logger is set as a
parameter, 
it is assigned to the per-thread (thread-local) logger field of Wire and in turn used during
logging 
output. Works like a charm.

Anyone thinks this is a good idea? Should it go into the main code or should I keep "extending"
the 
code with every updated version? If you like I can provide patches for my changes.

Just asking.

Lars

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


Mime
View raw message