> From: Bachran, Michael [mailto:[EMAIL PROTECTED]]
> Hi,
>
> I got a question on the ConsoleLogger. When sometimes someone forgets to
> set/enable the logging in a component you have to spend some time
> finding a
> NPE or getLogger() returning null might even affect the runtime behaviour
> (hopefully only during testing :-)). So my question is what you
> think about
> initializing the logger member inside AbstractLogEnabled
> (AbstractLoggable)
> with a ConsoleLogger so that getLogger() should never return null?
Michael,
the problem with that approach is that you may run a while with incorrect
logging and without knowing it. I'd recommend you use the
ComponentStateValidator
class in org.apache.avalon.excalibur.util (found in scratchpad).
This gives you a fail-fast program and should make the error easily
traceable.
/LS
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>