----- Original Message ----- From: "Jon Stevens" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 09, 2001 4:51 PM Subject: Re: [Vote] Logging
> on 5/8/01 11:26 PM, "Conor MacNeill" <[EMAIL PROTECTED]> wrote: > > > In the .antrc file (or .antrc.xml), we should use introspection to configure > > user preferred listeners/loggers. > > Ewwww....No! That is what interfaces are for. huh? > > 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 like. 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"/> </listener> In other words the abstractions are already in place - we don't need another. I'm -1 on binding any logger into the Ant core except through build events. Clear? Conor
