Log exceptions in ErrorPageFilter

For some reason I thought that the DispatcherServlet default handler
would log all exceptions, so if we did it in the ErrorPageFilter it
would lead to duplicates. That appears not to be the case.

Fixes gh-1427
This commit is contained in:
Dave Syer 2014-08-25 17:26:57 +01:00
parent 607f78a779
commit 2d67452128
1 changed files with 1 additions and 0 deletions

View File

@ -143,6 +143,7 @@ class ErrorPageFilter extends AbstractConfigurableEmbeddedServletContainer imple
rethrow(ex);
return;
}
logger.error("Forwarding to error page", ex);
setErrorAttributes(request, 500, ex.getMessage());
request.setAttribute(ERROR_EXCEPTION, ex);
request.setAttribute(ERROR_EXCEPTION_TYPE, type.getName());