Hi,
I have a function which is returning a boolean. I would like to log all
return values and have the logging not suck down performance.
I've noticed in the manual that it says I should do this
if (category.isInfoEnabled() ) {
category.log(Priority.INFO, ""+bMyReturnValue);
}
This would avoid the parameter concatenation if Info is not enabled. If
log4j had a method like
log(Priority, boolean) {
if (isEnabled(Priority) ) {
log(""+boolean);
}
}
wouldn't that allow me to only have a single line in my code like
category.log(INFO, bMyReturnValue)
and have equal performance? If so, are there any reasons that such a
method does not exist? or am I just be pedantic by only wanting the one
line?
Thanks,
IH
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]