On Mon, 26 Feb 2001, Mike Cannon-Brookes wrote:

> All of my taglibs use log4j for logging. The problem I find with
> Servletcontext.log() is that it's usually not as configurable as log4j
> (SMTPAppender is my friend) and can't legally be accessed from other
> tiers of your application such as clients or EJBs. Using log4j across
> the app provides a central point of logging.

Right -- I think the point is just that sometimes you want more control
over logging than your servlet container provides, or you want to
standardize on a logging mechanism across a company or enterprise without
worrying what specific servlet container is being used.

My design methodology is similar to what you describe, Mike, although like
I said, I tend to try to localize logging code as much as possible, not
doing it "across the app" if I can help it.  But that's largely because I
tend to need to log only exceptional conditions.

Shawn

Reply via email to