You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by Eduardo Pelegri-Llopart <Ed...@Sun.COM> on 2001/03/17 15:58:34 UTC

Re: log4j dependency in taglibs?

One thought to consider is that thre is a standard loging API that will
start showing up in Merlin (J2SE 1.4).  THta is JSR-47
(http://java.sun.com/aboutJava/communityprocess/jsr/jsr_047_log.html). 
If jakarta-taglibs adds a dependency on any other logging API, perhaps
it could do so it is relatively easy to use the standard API when it
starts showing up?

	- eduard/o

Mike Cannon-Brookes wrote:
> 
> Joe already has one of these - http://www.epesh.com/logtags.jsp - but I
> don't see how this solves your problem at all.
> 
> This allows you to log messages from within a JSP. People can already do
> this.
> 
> What we need is debugging information / errors logged from within tags.
> There's no other way to do this than add log4j logging to each taglib. (If
> we decide it's necessary). I don't see how creating a log taglib helps.
> 
> -mike
> 
> > -----Original Message-----
> > From: glenn@zathras.earthdome.org [mailto:glenn@zathras.earthdome.org]On
> > Behalf Of Glenn Nielsen
> > Sent: Monday, February 26, 2001 11:47 AM
> > To: taglibs-dev@jakarta.apache.org
> > Subject: Re: log4j dependency in taglibs?
> >
> >
> > 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             glenn@more.net | /* Spelin donut madder    |
> > MOREnet System Programming               |  * if iz ina coment.      |
> > Missouri Research and Education Network  |  */                       |
> > ----------------------------------------------------------------------
> >

Re: log4j dependency in taglibs?

Posted by Eduardo Pelegri-Llopart <Ed...@Sun.COM>.
That is good news.  Thanks!

	- eduard/o

Mike Cannon-Brookes wrote:
> 
> JSR-47 vs log4j will be a trivial change. (If anything, log4j will have a
> complete java.logging (stupid, stupid package name should be java.log)
> facade.)
> 
> I wouldn't worry about going with log4j now and changing over to
> java.logging later.
> 
> -mike
> 
> > -----Original Message-----
> > From: Eduardo Pelegri-Llopart [mailto:Eduardo.Pelegrillopart@Sun.COM]
> > Sent: Sunday, March 18, 2001 1:59 AM
> > To: taglibs-dev@jakarta.apache.org
> > Subject: Re: log4j dependency in taglibs?
> >
> >
> > One thought to consider is that thre is a standard loging API that will
> > start showing up in Merlin (J2SE 1.4).  THta is JSR-47
> > (http://java.sun.com/aboutJava/communityprocess/jsr/jsr_047_log.html).
> > If jakarta-taglibs adds a dependency on any other logging API, perhaps
> > it could do so it is relatively easy to use the standard API when it
> > starts showing up?
> >
> >       - eduard/o
> >
> > Mike Cannon-Brookes wrote:
> > >
> > > Joe already has one of these - http://www.epesh.com/logtags.jsp - but I
> > > don't see how this solves your problem at all.
> > >
> > > This allows you to log messages from within a JSP. People can already do
> > > this.
> > >
> > > What we need is debugging information / errors logged from within tags.
> > > There's no other way to do this than add log4j logging to each
> > taglib. (If
> > > we decide it's necessary). I don't see how creating a log taglib helps.
> > >
> > > -mike
> > >
> > > > -----Original Message-----
> > > > From: glenn@zathras.earthdome.org
> > [mailto:glenn@zathras.earthdome.org]On
> > > > Behalf Of Glenn Nielsen
> > > > Sent: Monday, February 26, 2001 11:47 AM
> > > > To: taglibs-dev@jakarta.apache.org
> > > > Subject: Re: log4j dependency in taglibs?
> > > >
> > > >
> > > > 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             glenn@more.net | /* Spelin donut madder    |
> > > > MOREnet System Programming               |  * if iz ina coment.      |
> > > > Missouri Research and Education Network  |  */                       |
> > > > ----------------------------------------------------------------------
> > > >

RE: log4j dependency in taglibs?

Posted by Mike Cannon-Brookes <mc...@internet.com>.
JSR-47 vs log4j will be a trivial change. (If anything, log4j will have a
complete java.logging (stupid, stupid package name should be java.log)
facade.)

I wouldn't worry about going with log4j now and changing over to
java.logging later.

-mike

> -----Original Message-----
> From: Eduardo Pelegri-Llopart [mailto:Eduardo.Pelegrillopart@Sun.COM]
> Sent: Sunday, March 18, 2001 1:59 AM
> To: taglibs-dev@jakarta.apache.org
> Subject: Re: log4j dependency in taglibs?
>
>
> One thought to consider is that thre is a standard loging API that will
> start showing up in Merlin (J2SE 1.4).  THta is JSR-47
> (http://java.sun.com/aboutJava/communityprocess/jsr/jsr_047_log.html).
> If jakarta-taglibs adds a dependency on any other logging API, perhaps
> it could do so it is relatively easy to use the standard API when it
> starts showing up?
>
> 	- eduard/o
>
> Mike Cannon-Brookes wrote:
> >
> > Joe already has one of these - http://www.epesh.com/logtags.jsp - but I
> > don't see how this solves your problem at all.
> >
> > This allows you to log messages from within a JSP. People can already do
> > this.
> >
> > What we need is debugging information / errors logged from within tags.
> > There's no other way to do this than add log4j logging to each
> taglib. (If
> > we decide it's necessary). I don't see how creating a log taglib helps.
> >
> > -mike
> >
> > > -----Original Message-----
> > > From: glenn@zathras.earthdome.org
> [mailto:glenn@zathras.earthdome.org]On
> > > Behalf Of Glenn Nielsen
> > > Sent: Monday, February 26, 2001 11:47 AM
> > > To: taglibs-dev@jakarta.apache.org
> > > Subject: Re: log4j dependency in taglibs?
> > >
> > >
> > > 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             glenn@more.net | /* Spelin donut madder    |
> > > MOREnet System Programming               |  * if iz ina coment.      |
> > > Missouri Research and Education Network  |  */                       |
> > > ----------------------------------------------------------------------
> > >