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: Per thread logging
Date Wed, 01 Aug 2007 11:54:24 GMT
On Tue, 2007-07-31 at 15:21 -0700, Lars George wrote:
> Hi Roland,
> 
> > The idea is good. I don't like the idea of a logger object in
> > the parameters though. Have you considered to put the _name_ of
> > the logger into the parameters and let Wire perform the lookup?
> 
> Makes sense, yes that is a good idea.
> 

Lars,

Why do not you simply use Log4J or similar logging toolkit to output the
name of the thread that generated the logging event?

In my opinion this kind of functionality falls into the responsibility
of the underlying logging toolkit, not HttpClient

Oleg


> > That's what I was planning for http-dispatch while I was still
> > working on it. Actually, I meant to allow a name in the params
> > and an object in the context, but the latter is a 4.0 concept.
> 
> One of these days I will spend some time and look into the new architecture. Sounds like
it is going 
> to be exciting.
> 
> > It is also possible to solve this without touching the API at all,
> > by using a logger implementation that keeps a ThreadLocal itself.
> > But changing Wire is surely simpler.
> 
> True, both is. Come to think of it, you are right. I sort of never thought of providing
my own 
> LogFactory and hand out special derived Logger that allow for that. Makes sense too.
> Since we know the name of the Logger the code requests, we could get the instance beforehand
and set 
> the threadlocal "sidekick" Logger for example. I like this.
> 
> > We've frozen the API. Contrib seems like a better place.
> 
> With such a change, how would that go into contrib? Just asking, since this is more a
patch, then 
> anything else, right? So in contrib, how would that be presented?
> 
> >> should I keep "extending" the code with every updated version?
> > I expect exactly one more updated version: 3.1 final.
> 
> True, but with the above idea of using the custom Logger, it seems not to matter anymore,
even later 
> when going to 4.0. I really have to reevaluate the whole idea.
> 
> Thanks,
> Lars
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
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