if(logger.isDebugEnabled() { logger.debug("Entry number: " + i + " is " + String.valueOf(entry[i])); }instead
logger.debug("Entry number: " + i + " is " + String.valueOf(entry[i]));
In log4j 2 [2], you can use the new featurelogger.debug("Entry number: {} is {}", i, entry[i]);
References
[1] http://logging.apache.org/log4j/1.2/manual.html
[2] http://logging.apache.org/log4j/2.x/performance.html