harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Zakharov" <alexei.zakha...@gmail.com>
Subject Re: [classlib] logging from within our implementation
Date Thu, 01 Jun 2006 09:19:33 GMT
Hi Soeren,

2006/6/1, Soeren Strassfeld <nc-straszso@netcologne.de>:
> 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
:)

-- 
Alexei Zakharov,
Intel Middleware Product Division

---------------------------------------------------------------------
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


Mime
View raw message