jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul P Akolkar <akol...@us.ibm.com>
Subject Re: Logging
Date Fri, 04 Mar 2005 19:28:54 GMT
Martin,

Thanks for your input. I'm not trying to re-invent anything, the last 
thing we need is a new "logging abstraction" ;-) 

> As I understand it, the only dependency is Commons Logging. 
> Log4j is optional - you only need it if that's the particular
> logging implementation you want to use.

Are you sure? I dropped taglibs-log.jar in WEB-INF/lib and visited this 
JSP:

<%@ taglib prefix="log" uri="http://jakarta.apache.org/taglibs/log-1.0"%>
<log:info>Lets hope we don't have any other dependency!</log:info>

to be greeted with:

java.lang.NoClassDefFoundError: org/apache/log4j/Priority

Not sure where the log4j default assumption came from.

> Otherwise, it's going to be hard to sync up two different
> logs when you're trying to identify a problem. So you really
> want one log, and hence one logging mechanism.

Thats seems fair enough, but its hard to find a one-sided coin these days 
;-) So:

1) I suspect most times the app author wouldn't want to be involved in the 
internal logging from a taglib (in fact, it may be more of a hindrance in 
most cases due to the proliferation of log statements), and a taglib 
author has orthogonal interests.
2) If the above log4j dependency is true, then the usage of the log taglib 
within the rdc taglib has already bound the rdc-based app developer to 
log4j (for the one log argument). Personal preference is one thing, I 
definitely would not want to insist on a log4j dependency for all RDC 
based apps.

> On every project I have worked on that uses JDK 1.4 as a minimum,
> we have used Log4j over JDK logging.

Over JDK logging? I'm interested in knowing what taglib you used for your 
JSP logging.

> As Ceki (Mr. Log4j) and others have said many times, JDK 1.4
> logging is like they based it on Log4j concepts but left out the good
> parts. ;-)
<snip>
> Anything that works with Commons Logging works with JDK 1.4 logging
> already. 

Well, am sure some of our friends are working on that ;-) I am not 
interested in debating which one is better, I've gone through reviews and 
now-famous blog postings ;-) But I do want the choice as a taglib author! 
I do not see the JDK option being available at all, and if that is indeed 
the case, maybe its time to change that.

-Rahul

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message