소스 검색

에러 트레이스

marseyes 2 년 전
부모
커밋
d1ac3945a3
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      src/main/java/com/oqpo/api/web/controller/ApiExceptionHandler.java

+ 5 - 0
src/main/java/com/oqpo/api/web/controller/ApiExceptionHandler.java

@@ -115,6 +115,11 @@ public class ApiExceptionHandler {
115 115
     protected ExceptionDTO handleException(Exception e, HttpServletRequest request, HttpServletResponse response) {
116 116
         log.error(e.getMessage());
117 117
         //e.printStackTrace();
118
+        //에러 트레이스
119
+        Writer buffer = new StringWriter();
120
+        PrintWriter pw = new PrintWriter(buffer);
121
+        e.printStackTrace(pw);
122
+        log.error(buffer.toString());
118 123
 		
119 124
         return ExceptionDTO.builder()
120 125
                 .status(HttpStatus.INTERNAL_SERVER_ERROR.value())