ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <umag...@rediffmail.com>
Subject Re: [Vote] Logging
Date Tue, 08 May 2001 18:26:49 GMT
Hi,
Ant2 has got bigger fish to fry.  I suggest we let the end-user decide what logging tool to
use with Ant2.  We can create a Logger interface and provide a couple of implementations -
probably for Log4J and LogKit.  

The user can choose from one of the default implementations or write a Custom implementation
for some other logging tool, if s/he needs to.  

Please find attached a REAL  CRUDE implementation, but one that will illustrate (I hope :-))
what I am trying to convey.  

I have implemented the Logger interface for Log4J and most popular logging tool - System.out
;-). Configure log.properties either with Log4JLogger or SystemOutLogger as the value for
the key LogClassName.

Cheers,
Magesh


------------- Original Message --------------
Peter Donald <donaldp@apache.org> wrote:
To:ant-dev@jakarta.apache.org
From:Peter Donald <donaldp@apache.org>
Date:Tue, 08 May 2001 23:24:32 +1000
Subject: [Vote] Logging 

Hi,

I would like to do Ant2 logging with logkit. Logkit is a lightweigh logging
toolkit developed a couple of years ago as an easy to use performance
logging. It is part of the Avalon project.

I am willing to bet the first question asked is why we use this instead of
either the Logging JSR or Log4j. The Logging JSR has recently been changed
to JDK1.4+ only so that is not really an option. 

Log4j is a lto larger a product. It has significantly more features -
object rendering, ability to build custom priorities, stack introspectiong,
internationalisation and a few more that I have probably missed. However
along with this comes extra complexity, bulk and size.

Ant does not need any of these features; 
* object rendering is not useful as tasks won't be directly interfacing
with that section (breaks IOC Container-component contract)
* we don't need custom priorities
* we don't need stack introspection because logging will already be
redirected on per task basis (again via IOC).

Log4j vs Logkit in size: 180 kb vs 20 kb

Logkit also has a minimal client interface; only variation on three methods
to learn for task writers - namely

debug( String message ); - log debug message
debug( String message, Exception e ); - log debug message and an exception
isDebugEnabled() - check if debug is enabled for logger - useful to avoid
expensive loggin operations

Repeat and replace debug for the other priority levels (info, warn, error,
fatalError).

If we adopt the Avalon Framework then logkit is already integrated into
lifecycle. There is also useful base class to inherit from.

The only problem is again lack of documentation - however along with the
Avalon framework this will be addressed post the 11 th ;)

Votes?

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


_____________________________________________________
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com



Mime
View raw message