Jon Stevens <[EMAIL PROTECTED]> writes:
> on 6/6/01 9:23 AM, "David S. Faller" <[EMAIL PROTECTED]> wrote:
>
> > What about something like:
> > if (Log.getLogLevel() > Log.LEVEL_DEBUG) {
> > Log.debug("myMethod() entered. param1="+param1+";param2="+param2);
> > }
>
> Actually, that still doesn't work 100% well...here is some test
> code...compile it and then run javap -c Test and you will see that using a
> method like that does not compile out the code as you would hope it does...
Regardless of whether the log level thing compiles code out (which it
does not, as you say), it does save numerous method calls to
StringBuffer's append() method, and one call to its toString() method
for a standard String concatenation operation.
Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]