harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Shimansky <gshiman...@gmail.com>
Subject Re: [classlib] logging from within our implementation
Date Tue, 30 May 2006 20:28:51 GMT
On Wednesday 31 May 2006 00:09 Ivan Volosyuk wrote:
> I am not sure, we can say someday: Yes, the code is absolutely bug
> free! Remove the logging!
>
> I have a suggestion, which can help leave logging in place while still
> having no impact on performance. The logging can be used for debuging
> of features and will be removed in release version. It require some
> changes to build system though.
>
> The idea is quite simple: we can use C preprocessor directives in java
> files. When building the preprocessor will be executed before java
> compiler (if the source-file's timestamp was changed). Thus we can
> have logger-free release builds and debug builds with full weight
> logging.

I have a simpler suggestion which doesn't require any tools foreign to java. 

Make classlib debugging infrastructure internal class, not java.util.logging, 
but an internal wrapper to classes in java.util.logging. And in release 
version all its methods should be empty.

Any good behaving optimizing runtime would inline empty methods into nothing 
and therefore no performance impact would be made.

-- 
Gregory Shimansky, Intel Middleware Products 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