Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 90289 invoked from network); 10 Nov 2005 12:52:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Nov 2005 12:52:03 -0000 Received: (qmail 43736 invoked by uid 500); 10 Nov 2005 12:51:59 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 43678 invoked by uid 500); 10 Nov 2005 12:51:58 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 43667 invoked by uid 99); 10 Nov 2005 12:51:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Nov 2005 04:51:58 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [192.6.10.17] (HELO gort.hpl.hp.com) (192.6.10.17) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Nov 2005 04:51:51 -0800 Received: from kropotkin.hpl.hp.com (kropotkin.hpl.hp.com [15.144.59.2]) by gort.hpl.hp.com (8.12.10/8.12.10) with ESMTP id jAACp0v4016585 for ; Thu, 10 Nov 2005 12:51:00 GMT Received: from localhost (localhost [127.0.0.1]) by kropotkin.hpl.hp.com (Postfix) with ESMTP id 096FC552D for ; Thu, 10 Nov 2005 12:50:59 +0000 (GMT) Received: from kropotkin.hpl.hp.com ([127.0.0.1]) by localhost (kropotki [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08469-01-2 for ; Thu, 10 Nov 2005 12:50:59 +0000 (GMT) Received: from timmay.hpl.hp.com (timmay-hb.hpl.hp.com [15.144.59.39]) by kropotkin.hpl.hp.com (Postfix) with ESMTP id 36D6B42DB for ; Thu, 10 Nov 2005 12:50:59 +0000 (GMT) Received: from [15.144.25.135] (chamonix.hpl.hp.com [15.144.25.135]) by timmay.hpl.hp.com (8.13.2/8.13.2) with ESMTP id jAACnAqG012996 for ; Thu, 10 Nov 2005 12:49:10 GMT Message-ID: <437341C6.6070707@apache.org> Date: Thu, 10 Nov 2005 12:49:10 +0000 From: Steve Loughran User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Developers List Subject: Re: PROPOSE: Property Trace Facility For Ant? References: <43719F02.6050704@arielpartners.com> <255d8d690511090705q34733b3pbc8c1a88e23bfcd@mail.gmail.com> <43726AF3.7000707@arielpartners.com> <255d8d690511091415i1e144de9ic8a04af5562e805a@mail.gmail.com> <43727B5B.3010807@arielpartners.com> In-Reply-To: <43727B5B.3010807@arielpartners.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HPLB-IMAP-MailScanner-Information: Please contact the Helpdesk for more information X-HPLB-IMAP-MailScanner: Found to be clean X-HPLB-IMAP-MailScanner-SpamCheck: not spam, SpamAssassin (score=0, required 5) X-Virus-Scanned: amavisd-new at kropotkin.hpl.hp.com X-HPL-MailScanner-Information: Please contact the Helpdesk for more information X-HPL-MailScanner: Found to be clean X-HPL-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.426, required 5, autolearn=not spam, AWL 0.17, BAYES_00 -2.60) X-MailScanner-From: stevel@apache.org X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Craeg Strong wrote: > Dominique Devienne wrote: > >> >> Changing an interface is a no-no of course. >> >> >> >> So far I think I like #1 best, i.e. adding a few overrides to the log >> methods in ProjectComponent to support an additional category. I'm not >> sure we'd need hierarchical categories a la Log4J or >> java.util.logging. Makes it more complex, and we don't want to slow >> down Ant's logging. --DD >> >> > Yes, I see that this kind of approach would be simpler. How about the > following: > > A) enhance the Property task to log a message when it sets a property, > just like XmlProperty does, e.g. > (2 lines of code) > > [xmlproperty] foo:MUMBLE > Setting project property: foo -> MUMBLE > [property] foo:BARF > Override ignored for property "foo" > > B) enhance PropertyHelper to log a message when it resolves a property > in replaceProperties, e.g. > (1 line of code) > > Retrieving project property foo:MUMBLE > [echo] value is MUMBLE > > The idea is that if you need to trace a particular property, say "foo" > you can grep the -debug output. Not bad... > > There are several options for when to print the log messages: > 1) make it happen in debug, which makes debug even more verbose > 2) add logging categories, so property traces only show up when you ask > for them > 3) add a sixth logging category like MSG_TRACE which will include all > debug info + property trace (and maybe more) > > (buildfile follows) > > > > value is ${foo} > > Actually, I quite like the listener approach. We just need an extended listener; there is no reason the -listener command can't handle both types. The nice thing about a listener is that it lets an IDE do fancy things like list all properties. if we are going to do this, we should also extend the listener with info about every reference created. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org