Cool, in my case I was using barebones commons logging and sometimes slf4j. Unfortunately, they are not smart enough (atleast the commons one if I remember correctly). So what happens is it creates a possibly expensive message (e.g. "Creating a new singelton instance" string) for no purpose even if log4j configuration or underling logging subsystem disables debugging. That's the reason why I suggested using isdebugenablued(). After all we cannot be sure what everyone is using for logging so its always better to err on the side of caution.

Also, really really awesome job in fixing the obvious and not so obvious errors :) 

-sandeep