On 30/05/06, Chris Gray <[EMAIL PROTECTED]> wrote:
If the implementation is an empty method and is final, a straightforward
static flow analysis will show that the evaluation of the arguments can also
be optimised away.

Not necessarily. Evaluation of arguments may have side-effects, and
therefore even if the call to the logging gets optimised away, the
evaluation may not be. It's better to have an array of Strings and let
the logger do the concatenation rather than have a single
Object/String and performing the concatenation, because then the
logger can do the concatenation through stream manipulation rather
than in-memory copying.

That said, I don't think there's a great benefit of having logging in
production code once it's complete, and I think that an aspect would
be a better way of compiling with debugging code in.

Alex.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to