Why does a difference of opinion always have to lead to someone
saying "I don't think you get what I'm saying"? Sigh. I get it just
fine, I just disagree.
So what you're saying effectively is that developers who are smart
enough/well trained enough to know to wrap expensive logging
statements in a guard will not be smart enough/remember to use a
different logging method signature?
At any rate, while the Seam style looks nice after the fact, I do
tend to think that's it more of a pain to write with placeholders and
all. I use a syntax like this:
log.debug("And the answer is: ", myBigObject, " (didn't you
guess?).");
So that all you're really doing is replacing + symbols with commas,
and getting the same benefit.
-t
On Aug 22, 2006, at 5:26 PM, Martin Cooper wrote:
No, I don't think you're getting what I'm saying. I'm not talking
about
internal toString() calls, I'm talking about something like:
log.debug("And the answer is: " + myBigObject.toString());
That toString() method is going to be invoked before the log.debug
method is
ever called, so the cost is sunk even if debug logging is disabled.
Now, I get the point that I should probably have used a
parameterised string
and passed in myBigObject, letting the log method to the toString()
call,
but people are so used to doing things like the above that it will
still
happen.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]