We were in the final push towards a major release of a large public-facing J2EE application when I was assigned The Defect. The application, which had been working quite well in functional test environments (all things considered), suddenly stopped when deployed to SIT. Well, it started up ok, but if you tried to log in, you were faced with a long wait. Very long.
It was exactly the same code that had been working in other environments, but the difference in SIT, of course, was that debug logging was turned off.
After a day of changing logging levels, bouncing WebSphere servers and tracing debug logging code, I stumbled across this gem:
Iterator i = formBean.getKeys();
while (i.hasNext()) {
if (LOG.isDebugEnabled()) {