From harmony-dev-return-8139-apmail-incubator-harmony-dev-archive=incubator.apache.org@incubator.apache.org Thu Jun 01 21:41:42 2006 Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 36304 invoked from network); 1 Jun 2006 21:41:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Jun 2006 21:41:42 -0000 Received: (qmail 57794 invoked by uid 500); 1 Jun 2006 21:41:40 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 57062 invoked by uid 500); 1 Jun 2006 21:41:38 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 57051 invoked by uid 99); 1 Jun 2006 21:41:38 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jun 2006 14:41:38 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 64.74.244.71 is neither permitted nor denied by domain of geir@pobox.com) Received: from [64.74.244.71] (HELO chi.mobile-health-diary.com) (64.74.244.71) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 01 Jun 2006 14:41:37 -0700 Received: (qmail 31100 invoked from network); 1 Jun 2006 21:41:14 -0000 Received: from ool-43560edb.dyn.optonline.net (HELO ?192.168.1.102?) (geir@67.86.14.219) by b014.internal.mobile-health-diary.com with SMTP; 1 Jun 2006 21:41:14 -0000 Message-ID: <447F5E12.1030705@pobox.com> Date: Thu, 01 Jun 2006 17:37:22 -0400 From: Geir Magnusson Jr Reply-To: geir@pobox.com User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: [classlib] logging from within our implementation References: <447C6E8B.8020202@pobox.com> <200605302307.07986.chris.gray@kiffer.be> <636fd28e0605301438p55094e6fk48312387ef8c78d6@mail.gmail.com> <200605310754.06598.chris.gray@kiffer.be> <636fd28e0605310127y47249081iecde78c54df8260c@mail.gmail.com> <447E067B.5050100@netcologne.de> <2c9597b90606010219u600913dcl92359f22342615e8@mail.gmail.com> <447F1409.4010405@netcologne.de> <2c9597b90606010938n3a993ba9gc4650863c4aeeeb0@mail.gmail.com> In-Reply-To: <2c9597b90606010938n3a993ba9gc4650863c4aeeeb0@mail.gmail.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Alexei Zakharov wrote: > I worry about the situation when we got something Velocity-like in > java code. Strings like "#foreach" or smth. like it in comments. This > will probably break the V. compiler. > Hey now.... Where do we have #foreach in our code? geir > 2006/6/1, Soeren Strassfeld : >> Hi Alexei, >> >> I think the result in both examples is quite the same, I just liked >> the Idea to just add java comments to the code, so you donīt >> need a precompiler as long as you build the classlib with logging >> statements. >> >> Cheers, >> Soeren >> >> Alexei Zakharov schrieb: >> > Hi Soeren, >> > >> > 2006/6/1, Soeren Strassfeld : >> >> How about using Velocity as Preprocessor. >> >> You could put all logging Statements between an >> >> //#if ($debug) >> >> and >> >> //#end >> >> So the Code would stay pure java, and the debug Version could be >> >> compiled >> >> without a Preprocessor. >> > >> > Is this something better than just using java in the same way? >> > >> > static final boolean DEBUG = false; >> > if (DEBUG) { >> > // wiped away by java compiler >> > log("my useful log message"); >> > } >> > >> > The problem of your approach as well as the above example is the >> > additional syntax you need to add to each log call. >> > >> > However, I like the general idea of using Velocity as a Java >> preprocessor >> > :) >> > > > --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org