Repository: struts Updated Branches: refs/heads/master c83e07ec4 -> 6dcff10a6
WW-4761 Improve error logging in DefaultDispatcherErrorHandler Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/6dcff10a Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/6dcff10a Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/6dcff10a Branch: refs/heads/master Commit: 6dcff10a68683a5ffd8f5605d87afd97a231bba2 Parents: c83e07e Author: Aleksandr Mashchenko <amashche...@apache.org> Authored: Thu Mar 16 20:16:06 2017 +0200 Committer: Aleksandr Mashchenko <amashche...@apache.org> Committed: Thu Mar 16 20:16:06 2017 +0200 ---------------------------------------------------------------------- .../apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/6dcff10a/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java b/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java index 4abb23f..2bf7c9f 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/DefaultDispatcherErrorHandler.java @@ -66,7 +66,7 @@ public class DefaultDispatcherErrorHandler implements DispatcherErrorHandler { // WW-1977: Only put errors in the request when code is a 500 error if (code == HttpServletResponse.SC_INTERNAL_SERVER_ERROR) { // WW-4103: Only logs error when application error occurred, not Struts error - LOG.error("Exception occurred during processing request: {}", e, e.getMessage()); + LOG.error("Exception occurred during processing request: {}", e.getMessage(), e); // send a http error response to use the servlet defined error handler // make the exception available to the web.xml defined error page request.setAttribute("javax.servlet.error.exception", e); @@ -83,7 +83,7 @@ public class DefaultDispatcherErrorHandler implements DispatcherErrorHandler { } protected void handleErrorInDevMode(HttpServletResponse response, int code, Exception e) { - LOG.debug("Exception occurred during processing request: {}", e, e.getMessage()); + LOG.debug("Exception occurred during processing request: {}", e.getMessage(), e); try { List<Throwable> chain = new ArrayList<>(); Throwable cur = e;