From dev-return-69821-apmail-ant-dev-archive=ant.apache.org@ant.apache.org Wed Nov 09 22:43:08 2005 Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 56418 invoked from network); 9 Nov 2005 22:43:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Nov 2005 22:43:07 -0000 Received: (qmail 57598 invoked by uid 500); 9 Nov 2005 22:43:05 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 57555 invoked by uid 500); 9 Nov 2005 22:43:04 -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 57544 invoked by uid 99); 9 Nov 2005 22:43:04 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Nov 2005 14:43:04 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [207.99.47.53] (HELO host53a.simplicato.com) (207.99.47.53) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Nov 2005 14:42:57 -0800 Received: from localhost (localhost.simplicato.com [127.0.0.1]) by host53a.simplicato.com (Postfix) with ESMTP id 82E344308EE; Wed, 9 Nov 2005 17:42:35 -0500 (EST) Received: from host53a.simplicato.com ([127.0.0.1]) by localhost (host53a.simplicato.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 76226-03-2; Wed, 9 Nov 2005 17:42:35 -0500 (EST) Received: from [10.0.1.5] (cpe-68-175-65-12.nyc.res.rr.com [68.175.65.12]) by host53a.simplicato.com (Postfix) with ESMTP id 3AF5643089C; Wed, 9 Nov 2005 17:42:28 -0500 (EST) Message-ID: <43727B5B.3010807@arielpartners.com> Date: Wed, 09 Nov 2005 17:42:35 -0500 From: Craeg Strong Organization: Ariel Partners, LLC 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> In-Reply-To: <255d8d690511091415i1e144de9ic8a04af5562e805a@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at simplicato.com X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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} --Craeg --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org