On Sun, 25 Feb 2001, Tim Dawson wrote:

> The i18n taglib I'm prepping for submission makes use of Log4j... most of
> the calls are for debugging and can be removed now that it works properly,
> but there are two instances where it is useful:
> 
> 1. when a key is not found in the bundle for a given locale
> 2. when a user's requested locale is not available

Do these conditions cause exceptions to be thrown?  I'm much more
inclined, personally, to localize logging and exception handling to a
single point in the code whenever that's possible.  In other words, I'd
prefer in my own code to handle these exceptions at a much higher level,
deciding inside an errorPage (for instance) whether to log them, notify
the user, ignore them, and so on.

If the conditions aren't exceptional and you just want to print status or
debugging information, I'm all for using log4j from taglibs; considering
it's part of Jakarta, it's a sensible dependency as far as I'm concerned.  
And it shouldn't complicate the build process *too* much... :)

But if the conditions are handled by higher-level code, I'd suggest
letting them be logged by higher-level code.

Shawn

Reply via email to