Lars George wrote: > 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?
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? 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. 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. > Should it go into the main code or We've frozen the API. Contrib seems like a better place. > should I keep "extending" the code with every updated version? I expect exactly one more updated version: 3.1 final. > If you like I can provide patches for my changes. As mentioned above, for contrib it would be welcome. Just open a feature request in JIRA and attach a patch. thanks and cheers, Roland --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
