提交 e0423fbd 编写于 作者: J Juergen Hoeller

Revise inline comment for logException call

Closes gh-22794
上级 359c4f09
......@@ -109,7 +109,7 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti
* @see java.util.logging.Logger#getLogger(String)
*/
public void setWarnLogCategory(String loggerName) {
this.warnLogger = !StringUtils.isEmpty(loggerName) ? LogFactory.getLog(loggerName) : null;
this.warnLogger = (!StringUtils.isEmpty(loggerName) ? LogFactory.getLog(loggerName) : null);
}
/**
......@@ -138,11 +138,11 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti
prepareResponse(ex, response);
ModelAndView result = doResolveException(request, response, handler, ex);
if (result != null) {
// Print warn message when warn logger is not enabled...
// Print debug message when warn logger is not enabled.
if (logger.isDebugEnabled() && (this.warnLogger == null || !this.warnLogger.isWarnEnabled())) {
logger.debug("Resolved [" + ex + "]" + (result.isEmpty() ? "" : " to " + result));
}
// warnLogger with full stack trace (requires explicit config)
// Explicitly configured warn logger in logException method.
logException(ex, request);
}
return result;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册