Skip to content

Commit 2d67452

Browse files
author
Dave Syer
committed
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
1 parent 607f78a commit 2d67452

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

spring-boot/src/main/java/org/springframework/boot/context/web/ErrorPageFilter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ private void handleException(HttpServletRequest request,
143143
rethrow(ex);
144144
return;
145145
}
146+
logger.error("Forwarding to error page", ex);
146147
setErrorAttributes(request, 500, ex.getMessage());
147148
request.setAttribute(ERROR_EXCEPTION, ex);
148149
request.setAttribute(ERROR_EXCEPTION_TYPE, type.getName());

0 commit comments

Comments
 (0)