mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-29 18:59:03 +00:00
Update DefaultHandlerExceptionResolver logging
Reduce logging for NoResourceFoundException and NoHandlerFoundException. Closes gh-30884
This commit is contained in:
+11
@@ -662,4 +662,15 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes
|
||||
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void logException(Exception ex, HttpServletRequest request) {
|
||||
if (ex instanceof NoHandlerFoundException || ex instanceof NoResourceFoundException) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(buildLogMessage(ex, request));
|
||||
}
|
||||
return;
|
||||
}
|
||||
super.logException(ex, request);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user