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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]