diff options
Diffstat (limited to 'cps-rest/src/main/java')
-rw-r--r-- | cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java b/cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java index d4faebc329..2b096240bd 100644 --- a/cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java +++ b/cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java @@ -19,6 +19,7 @@ package org.onap.cps.rest.exceptions; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; import org.onap.cps.rest.controller.AdminRestController; import org.onap.cps.rest.controller.DataRestController; @@ -33,6 +34,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; +@Slf4j @RestControllerAdvice(assignableTypes = {AdminRestController.class, DataRestController.class}) public class CpsRestExceptionHandler { @@ -71,6 +73,7 @@ public class CpsRestExceptionHandler { private static ResponseEntity<Object> buildErrorResponse(final HttpStatus status, final String message, final String details) { + log.error("An error has occurred : {} Status: {} Details: {}", message, status, details); final ErrorMessage errorMessage = new ErrorMessage(); errorMessage.setStatus(status.toString()); errorMessage.setMessage(message); |