ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject Re: Ant2 logging
Date Thu, 10 May 2001 04:55:30 GMT

This seems a bit of tangential religious issue, but since i was adding a
skinny facade to my own code this week to swap between printing to the
console and log4j. I do understand why sometimes it is important to be able
to switch log systems. In this case I did it that way because I wanted a
redistributable version with minimal dependencies.

----- Original Message -----
From: "Jon Stevens" <jon@latchkey.com>
To: <ant-dev@jakarta.apache.org>
Sent: Wednesday, May 09, 2001 8:04 PM
Subject: Re: Ant2 logging


> on 5/9/01 7:56 PM, "Tim Vernum" <Tim.Vernum@macquarie.com.au> wrote:
>
> > From: Jon Stevens [mailto:jon@latchkey.com]
> >
> >> I want to be able to have Ant use LogKit or Log4J as the tool
> >> that writes
> >> out logging information (how it is formatted to look is another topic
> >> entirely) by simply specifying in some configuration file somewhere at
> >> runtime.
> >
> > Why?
> > Why do you care what toolkit Ant uses to do the logging?
>
> Simply put:
>
>     I want choice.

This isn't enough. If the base framework lets you add your own log output
classes, then you don't need an extra layer of indirection.

>
> Here is another very good reason:
>
> > (*) However, I do think that logging should be pluggable, because
> > one of the goals (IIRC) of Ant2 was to allow Ant to be embedded,
> > and I think we need to let the host program decide which logging
> > toolkit is being used.

This may be a valid answer.

My preference would be that logging would be something provided by the
container executing the tasks; we could have the base heirarchy hand off the
actual output to some logging tool, I don't care which, as long as it is
skinny. Except that when Java1.5 adds logging we should eventually migrate
over to that framework. If the base logging framework does heirarchies and
things for free, then we've just saved a lot of work.

Incidentally Jon, one comment of yours I do agree wholeheartedly is
"HttpUrlConnection is even worse." Isn't it about time we came up with a
decent apache branded re-implementation of this class that actually works
the way people want?

-Steve




Mime
View raw message