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

While I am at it, we also have the need to log requests on a per thread basis. We have users
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
I have since then amended Wire to hold an optional thread-local field of a logger that I hand
using the setParameter() of the HttpClient (or HttpState etc.). If the logger is set as a
it is assigned to the per-thread (thread-local) logger field of Wire and in turn used during
output. Works like a charm.

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

Just asking.


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

View raw message