Why? Nothing prevents you from writing:
 Blah blah = new Blah();
 blah.setLogger(getLogger());

Nothing ...as long as a LogEnabled creates the object.

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.

Uh? "POM"?

Aehm ...I meant POJO

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



A big +1. *That* would lead to over-componentization !

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.



Yup: Hierarchy.getDefaultHierarchy().getLogger("any.category");

There you go...

cheers
--
Torsten

Reply via email to