From 5103f91a4bd30f14ee19952f09a5b9b070cc3126 Mon Sep 17 00:00:00 2001 From: "koo.taejin" Date: Tue, 18 Oct 2016 18:34:33 +0900 Subject: [PATCH] #535 Shows detail error message when web controller meets any exception. 1. improve log message when occur exception. --- .../pinpoint/web/controller/ControllerExceptionHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/main/java/com/navercorp/pinpoint/web/controller/ControllerExceptionHandler.java b/web/src/main/java/com/navercorp/pinpoint/web/controller/ControllerExceptionHandler.java index 95c2e525ddbd..2ff14fcb7f1a 100644 --- a/web/src/main/java/com/navercorp/pinpoint/web/controller/ControllerExceptionHandler.java +++ b/web/src/main/java/com/navercorp/pinpoint/web/controller/ControllerExceptionHandler.java @@ -48,7 +48,9 @@ public class ControllerExceptionHandler { @ExceptionHandler(value = Exception.class) public ModelAndView defaultErrorHandler(HttpServletRequest request, Exception exception) throws Exception { - logger.warn("Error:{}", exception.getMessage(), exception); + Map requestResource = createRequestResource(request); + logger.warn("Failed to execute controller methods. message:{}, request:{}.", getExceptionMessage(exception), requestResource, exception); + ModelAndView mav = new ModelAndView(); mav.addObject("exception", createExceptionResource(request, exception)); mav.setViewName(DEFAULT_ERROR_VIEW);