But as a developer, make sure you use log.isDebugEnabled in places where it is appropriate. You don't want to wrap all the log.debug statements. That wont gain you much performance, instead increase code cluttering.
One best place I would suggest is when you try to print a object which has a large toString method with a reflection to string implementation or so.
So,
I use log.debug("Start")
and
if (log.isDebugEnabled()) {
log.debug(complexObject.toString());
}
No comments:
Post a Comment