Restore log level for resolved exceptions

The fix for SPR-17178 switched from debug to warn level warning for
all sub-classes of AbstractHandlerExceptionResolver where the request
concerned the DefaultHandlerExceptionResolver only.

This commit restores the original DEBUG level logging that was in
AbstractHandlerExceptionResolver from before SPR-17178. In addition
DefaultHandlerExceptionResolver registers a warnLogCategory by default
which enables warn logging and hence fulfilling the original goal
for SPR-17178.

Issue: SPR-17383
This commit is contained in:
Rossen Stoyanchev
2018-10-22 12:03:19 -04:00
parent de453ace86
commit 41e6aa6de2
3 changed files with 5 additions and 4 deletions

View File

@@ -72,8 +72,8 @@ public class ResponseStatusExceptionHandler implements WebExceptionHandler {
if (this.warnLogger != null && this.warnLogger.isWarnEnabled()) {
this.warnLogger.warn(logPrefix + formatError(ex, exchange.getRequest()), ex);
}
else if (logger.isWarnEnabled()) {
logger.warn(logPrefix + formatError(ex, exchange.getRequest()));
else if (logger.isDebugEnabled()) {
logger.debug(logPrefix + formatError(ex, exchange.getRequest()));
}
return exchange.getResponse().setComplete();