hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: mix logs when capturing httpclient.wire traces in multi-threaded application
Date Thu, 09 Jul 2009 14:37:46 GMT
On Wed, Jul 08, 2009 at 03:46:55PM -0700, mikkin wrote:
> 
> Oleg,
> 
> Thanks for the reply.
> 
> Actually we would typically like each thread to have its wire trace recorded
> into its own file.

I do not think this is possible, but you may want to consult the log4j folks
for a more authoritive answer.

Oleg


 Let me explain with eg:
> 
> Thread 10 will capture wire trace of class A and store the wire trace in
> File A
> Thread 11 will capture wire trace of class B and store the wire trace in
> File B.
> 
> Both Thread 10 and Thread 11 will be running simultaneously ofcourse. We
> looked into the source code a while back and realized that Wire.java has a
> static HEADER_WIRE and CONTENT_WIRE fields and a private constructor. So
> could it be that when we do Logger.getLogger("httpclient.wire") in our
> constructor both Thread 10 and Thread 11 in the above example are returned
> with the same instance of the Wire log and thus causing the logs to get
> mixed up?
> 
> Currently we run 30 such threads and the output files are a disaster :)
> 
> Also, just as an FYI, we are using httpclient 3.x. 
> 
> Mikkin
> -- 
> View this message in context: http://www.nabble.com/mix-logs-when-capturing-httpclient.wire-traces-in-multi-threaded-application-tp24397094p24400772.html
> Sent from the HttpClient-User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> 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