I agree that log4j is a very nice API for logging.
Rather than add log4j logging to every taglib, perhaps it would
be better to just develope a logging taglib which uses log4j.
The latest version of log4j has the ability to create a Category instance
using a CategoryFactory, so the taglib could also support using JNDI
named references for logging.
Regards,
Glenn
Shawn Bayern wrote:
>
> 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
--
----------------------------------------------------------------------
Glenn Nielsen [EMAIL PROTECTED] | /* Spelin donut madder |
MOREnet System Programming | * if iz ina coment. |
Missouri Research and Education Network | */ |
----------------------------------------------------------------------