commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Hohwiller <jo...@j-hohwiller.de>
Subject Re: [logging] getChildLogger Patch submitted to bugzilla issue #36062
Date Sun, 09 Oct 2005 19:31:26 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

robert burrell donkin wrote:
> On Sat, 2005-10-01 at 02:52 +0200, Joerg Hohwiller wrote:
> 
>>-----BEGIN PGP SIGNED MESSAGE-----
>>Hash: SHA1
>>
>>Joerg Hohwiller wrote:
>>
>>>Hi there,
>>>
>>>it all works and all tests passed.
>>>I submitted the full patch at
>>>http://issues.apache.org/bugzilla/show_bug.cgi?id=36062
>>>
>>>Discussion is most welcome.
>>
>>First issue: I suggested to have non-arg constructors for each Logger
>>implementation that create a "root-logger" (logger with empty name).
>>This is not yet included (in the patch). I think this would be an
>>additional issue towards IoC because the container could use that constructor
>>instead of the LogFactory or the String constructor and from that point work
>>with getChildLogger from the Logger interface without casting.
> 
> 
> note that there are a few log implementations (in particular
> AvalonLogger) which cannot logically support this. sounds like a
> reasonable additional for those loggers which can logically support it.
The loggers that can not logically support this (AvalonLogger, but what else?)
are a bride to another meta-logger.
So the answer from the IoC point of view:
A component requires a logger and for using the logger it is bound against
a specific interface. The IoC container will provide a logger implementation for
this interface and injects it into the component. It will make no sense to
use another meta-logger as JCL implementation if you are in IoC and have the
freedom of choice.
If I understand it right, the only reason for such things as "AvalonLogger" are
if you have Avanlon as IoC container but want to use a library in a
avalon-component that wants to have a JCL logger.
The AvalonLogger has to be statically initialized anyways to be used properly
with JCL which is sick.
So the short resumee: does not matter for me.

> 
> - robert
Regards
  Jörg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDSXAOmPuec2Dcv/8RArGWAJ9AN3ugtSoDvDkHkcyqQ1aw2+grcACfXk03
1ZDDfXGajqVephY/0Vi6O/w=
=nFg+
-----END PGP SIGNATURE-----

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


Mime
View raw message