Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Invalid
-
7.5
-
None
-
None
Description
This section of code:
if (log.isInfoEnabled()) { log.info(getLogStringAndClearRspToLog()); } if (log.isWarnEnabled() && slowUpdateThresholdMillis >= 0) { final long elapsed = (long) req.getRequestTimer().getTime(); if (elapsed >= slowUpdateThresholdMillis) { log.warn("slow: " + getLogStringAndClearRspToLog()); } }
is wrong since getLogStringAndClearRspToLog() contains this bit:
rsp.getToLog().clear(); // make it so SolrCore.exec won't log this again
so the second call, if both are executed, has already cleared the rsp.toLog.
Besides it's poor form to have this kind of side-effect in a logging call.
I'll fix soon, now that I'm not in a panic thinking I introduced this with the logging bits I did recently, this has been around since 7.5