@@ -218,7 +218,6 @@ protected ModelAndView handleNoSuchRequestHandlingMethod(org.springframework.web
218218 protected ModelAndView handleHttpRequestMethodNotSupported (HttpRequestMethodNotSupportedException ex ,
219219 HttpServletRequest request , HttpServletResponse response , Object handler ) throws IOException {
220220
221- pageNotFoundLogger .warn (ex .getMessage ());
222221 String [] supportedMethods = ex .getSupportedMethods ();
223222 if (supportedMethods != null ) {
224223 response .setHeader ("Allow" , StringUtils .arrayToDelimitedString (supportedMethods , ", " ));
@@ -342,9 +341,6 @@ protected ModelAndView handleServletRequestBindingException(ServletRequestBindin
342341 protected ModelAndView handleConversionNotSupported (ConversionNotSupportedException ex ,
343342 HttpServletRequest request , HttpServletResponse response , Object handler ) throws IOException {
344343
345- if (logger .isWarnEnabled ()) {
346- logger .warn ("Failed to convert request element: " + ex );
347- }
348344 sendServerError (ex , request , response );
349345 return new ModelAndView ();
350346 }
@@ -363,9 +359,6 @@ protected ModelAndView handleConversionNotSupported(ConversionNotSupportedExcept
363359 protected ModelAndView handleTypeMismatch (TypeMismatchException ex ,
364360 HttpServletRequest request , HttpServletResponse response , Object handler ) throws IOException {
365361
366- if (logger .isWarnEnabled ()) {
367- logger .warn ("Failed to bind request element: " + ex );
368- }
369362 response .sendError (HttpServletResponse .SC_BAD_REQUEST );
370363 return new ModelAndView ();
371364 }
@@ -386,9 +379,6 @@ protected ModelAndView handleTypeMismatch(TypeMismatchException ex,
386379 protected ModelAndView handleHttpMessageNotReadable (HttpMessageNotReadableException ex ,
387380 HttpServletRequest request , HttpServletResponse response , Object handler ) throws IOException {
388381
389- if (logger .isWarnEnabled ()) {
390- logger .warn ("Failed to read HTTP message: " + ex );
391- }
392382 response .sendError (HttpServletResponse .SC_BAD_REQUEST );
393383 return new ModelAndView ();
394384 }
@@ -410,9 +400,6 @@ protected ModelAndView handleHttpMessageNotReadable(HttpMessageNotReadableExcept
410400 protected ModelAndView handleHttpMessageNotWritable (HttpMessageNotWritableException ex ,
411401 HttpServletRequest request , HttpServletResponse response , Object handler ) throws IOException {
412402
413- if (logger .isWarnEnabled ()) {
414- logger .warn ("Failed to write HTTP message: " + ex );
415- }
416403 sendServerError (ex , request , response );
417404 return new ModelAndView ();
418405 }
@@ -508,8 +495,8 @@ protected ModelAndView handleAsyncRequestTimeoutException(AsyncRequestTimeoutExc
508495 if (!response .isCommitted ()) {
509496 response .sendError (HttpServletResponse .SC_SERVICE_UNAVAILABLE );
510497 }
511- else if ( logger . isDebugEnabled ()) {
512- logger .debug ("Async timeout for " + request . getMethod () + " [" + request . getRequestURI () + "] " );
498+ else {
499+ logger .warn ("Async request timed out " );
513500 }
514501 return new ModelAndView ();
515502 }
0 commit comments