ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <>
Subject Re: MailLogger and Sound
Date Mon, 03 Jun 2002 20:50:24 GMT
Yeah, I knew I was going down a hazardous road when I built the MailLogger
on top of the DefaultLogger. I refactored the DefaultLogger to allow
subclasses to capture the output while it is being output to the console,
that is why you get your cake (console) and can eat it too (sends the

But as you've noted, the NoBannerLogger doesn't fit into this picture.  The
'hack' way to do this would be to refactor the NoBannerLogger for
subclassing like DefaultLogger, and then make a NoBannerMailLogger. It would
be nice to have a better "chainable" architecture for such things.

As it is, having a switch to control MailLogger to use NoBannerLogger-like
output is not a good idea. Its just not set up to handle that elegantly
since its built on the DefaultLogger.

Inheritance is an (evil) last resort, which we've resorted to here. :)


----- Original Message -----
From: "Scott Ellsworth" <>
To: "Ant Users List" <>
Sent: Monday, June 03, 2002 4:43 PM
Subject: Re: MailLogger and Sound

> On Monday, June 3, 2002, at 11:25  AM, Erik Hatcher wrote:
> >     ant -logger fail
> Thanks, Erik!
> This was exactly what one of my clients asked for recently, and I
> thought it would be much, much harder.
> Is there any way to chain loggers together in 1.5 or 1.6?  I usually use
> NoBannerLogger, as empty targets merely confuse people.  (A full build
> of our system hits thirty top level targets, and over two hundred
> subtargets.  Since many of these are empty, this saves a lot of
> mindspace.)
> If I use the MailLogger, the message, of course, contains every header,
> not just the ones sent by NoBannerLogger, as one can have only one
> logger defined.
> Failing that, is there any chance that we could fold the NoBanner
> functionality into MailLogger, perhaps by making it part of the standard
> logging behavior if a property is set?
> Scott
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message