ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject Re: [Vote] Logging
Date Wed, 09 May 2001 09:03:01 GMT

----- Original Message -----
From: "Jon Stevens" <>
To: <>
Sent: Wednesday, May 09, 2001 4:51 PM
Subject: Re: [Vote] Logging

> on 5/8/01 11:26 PM, "Conor MacNeill" <>
> > In the .antrc file (or .antrc.xml), we should use introspection to
> > user preferred listeners/loggers.
> Ewwww....No! That is what interfaces are for.

> Guys, this stuff isn't difficult.

No, its not.

The log methods you displayed have been in the Ant 1.x Task interface for a
long time. They get converted to events and sent to all build event
listeners. If you want to integrate a particular logging package, integrate
it as a listener. There is no need for it in the rest of the Ant code.

Create Log4JListener or LogKitListener or both or another, whatever you

If you want categories, use the build event context information to
associate them. Keep it simple.

If your listeners need some form of configuration, do that as part of the
ant initialisation (ie. in .antrc).
I expect it would be difficult to come up with a generic interface to allow
these to be initialised, so I suggest an XML-Introspection approach as used
in the rest of ant

<listener classname="org.apache.ant.Log4JListener">
   <logoutput target="syslogd"/>
   <log4jthingy value="fubar"/>

In other words the abstractions are already in place - we don't need

I'm -1 on binding any logger into the Ant core except through build events.



View raw message