Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 99994 invoked from network); 4 Jun 2002 02:34:42 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 4 Jun 2002 02:34:42 -0000 Received: (qmail 15815 invoked by uid 97); 4 Jun 2002 02:34:43 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 15774 invoked by uid 97); 4 Jun 2002 02:34:42 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 15760 invoked by uid 98); 4 Jun 2002 02:34:41 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <008701c20b70$5f9b2140$903b8f80@darden.virginia.edu> From: "Erik Hatcher" To: "Ant Users List" References: <20020603212216.60205.qmail@web13404.mail.yahoo.com> <000f01c20b55$e6bb8590$6401a8c0@darden.virginia.edu> <200206041120.07217.adammurdoch@apache.org> Subject: Re: MailLogger and Sound Date: Mon, 3 Jun 2002 22:34:38 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Very cool! Myrmidon (and Mutant) are on my list of things to research once Ant 1.5 goes final. ----- Original Message ----- From: "Adam Murdoch" To: "Ant Users List" Sent: Monday, June 03, 2002 9:20 PM Subject: Re: MailLogger and Sound On Tue, 4 Jun 2002 09:25, Erik Hatcher wrote: > That wouldn't really work. I mean, it *would* work, but you'd end up > having to override every method and defeat the purpose of subclassing. > NoBannerLogger is at the same inheritance level as DefaultLogger. > > Having a better thought out design that allows filtering chains would be > better than trying to think of work-arounds using the existing stuff. In myrmidon, our solution was to change the way listeners get configured, to work exactly the same way as tasks and data types get configured. That is, they get configured from an xml element. Doesn't matter where the xml comes from - it may be from the build file, or a config file, or assembled from command-line options, or whatever. You can use all the goodness that you can use for tasks or types: nested elements, properties, references, polymorphic types, and so on. What this lets you do, is to compose loggers at runtime, rather than needing to add a new logger class for each combination of format and destination. Polymorhpic types are particularly handy for this. For example, say we were to split the default logger into a formatter and a log sink. It would be easy to swap in a different formatter (xml, say, or no banner) while still sending the output to the console. Or to swap in a different sink (email, or a file) or swap both. Using polymorphic types also makes it simple to add new logger implementations (or formatters or sinks or whatever). Just plonk down an antlib in (say) $ANTHOME/lib and you're done. -- Adam -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: