Maybe just throw away (Abstract)LogEnabled and do constructor injection instead. Or even relegate Logging to an ordinary service, which is looked up like any other component.

As much as I like IoC I think logging is one of the reasons for overcomponentization. ...just because you need a logger instance. Passing it to the POM does not make it much nicer. In fact it's sometimes hard to draw the line. Component ...not a component.

Have logging as an explicit service does definitely not feel
right to me. Logging should be much more low-level!

I am not sure but to me IoC seems to hurt more than it helps
for logging. May I play devils advocate:
For how many projects would this *really* be a security issue?
If someone can log to your logger you probably have bigger
problems!

...and btw: if you need to you *can* get to any logging channel
even with logkit IIRC.

cheers
--
Torsten

Reply via email to