I recently found a log statement in my projects codebase that says \"here i am with search parameter==>===========11/30/2008===1====00:00 AM\"
what guidelines do you
Do not do String concatenation in logging statements, at least debug statements.
One Java app I was working on a while ago had dismal performance. So we cracked out the profiler to see where the bottlenecks were. Turned out that it was mostly due to String concatenation operations incurred by assembling DEBUG level logging statements that occurred ALL THE TIME inside nested inner loops etc (hah, and to think they got added in the first place to figure out why the performance was so bad!)
don't do this
LOGGER.debug("The variable was " + myVariable + " and we are doing " + foo);
Instead do this
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("put your debug statement here " + foo + " and " + bar);
}