You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Mike Brodhead <mk...@black-ice.org> on 2001/12/20 21:30:08 UTC

Re: correct inizialitation

>   The problem I'm looking for is that the file doesn't exist,
> internally log4j shows the exception FileNotFoundException but it
> doesn't propagate it, so I don't have any way to know this. I check

At the risk of starting a huge debate, I claim that this is not
desirable behavior.  Of course, it is good for the logger to swallow
exceptions generated during logging-- you don't want a full filesystem
to keep your production app from doing its job.

However, at startup you really want to know whether the logger was
initialized properly or not.  Configuration should throw an exception,
perhaps a checked exception.  Those applications that don't care
whether logging starts up properly still have the option of ignoring
the exceptions thrown.

Exceptions can tell the developer what went wrong, rather than forcing
a guess.

Anyway, that's my two cents.  Thoughts?

--mkb



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>