diff --git a/src/main/java/com/scg/stop/global/exception/GlobalExceptionHandler.java b/src/main/java/com/scg/stop/global/exception/GlobalExceptionHandler.java index b98b1ea5..8175ead1 100644 --- a/src/main/java/com/scg/stop/global/exception/GlobalExceptionHandler.java +++ b/src/main/java/com/scg/stop/global/exception/GlobalExceptionHandler.java @@ -5,6 +5,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatusCode; @@ -16,6 +17,7 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler; @RestControllerAdvice +@Slf4j public class GlobalExceptionHandler extends ResponseEntityExceptionHandler { @Override @@ -25,6 +27,8 @@ protected ResponseEntity handleMethodArgumentNotValid( HttpStatusCode status, WebRequest request) { + log.warn(ex.getMessage(), ex); + Map body = new HashMap<>(); body.put("status", 400); @@ -42,6 +46,9 @@ protected ResponseEntity handleMethodArgumentNotValid( @ExceptionHandler(BadRequestException.class) public ResponseEntity handleBadRequestException(BadRequestException ex) { + + log.warn(ex.getMessage(), ex); + Map body = new HashMap<>(); body.put("status", 400);