From f487427a32f410ab5c97a4092865d32beb88ee27 Mon Sep 17 00:00:00 2001 From: sheetalm Date: Wed, 18 Apr 2018 17:03:52 +0530 Subject: ActivitySpec - Correcting logger messages Correcting logger messages Change-Id: I2b5569e73ffaa5f5051646855037e5c43fb96383 Issue-ID: SDC-1048 Signed-off-by: sheetalm --- .../onap/sdc/activityspec/errors/DefaultExceptionMapper.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/onap/sdc/activityspec/errors/DefaultExceptionMapper.java b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/onap/sdc/activityspec/errors/DefaultExceptionMapper.java index d09d1740eb..7d1b5b4b11 100644 --- a/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/onap/sdc/activityspec/errors/DefaultExceptionMapper.java +++ b/services/activity-spec/activity-spec-web/activity-spec-service/src/main/java/org/onap/sdc/activityspec/errors/DefaultExceptionMapper.java @@ -53,17 +53,17 @@ public class DefaultExceptionMapper implements ExceptionMapper { } private Response transform(ActivitySpecNotFoundException notFoundException) { - LOGGER.error("Transforming ActivitySpecNotFoundException to Error Response :", notFoundException); + LOGGER.error("Error while fetching Activity Spec :", notFoundException); return generateResponse(Status.NOT_FOUND, new ActivitySpecErrorResponse(notFoundException.getMessage())); } private Response transform(CoreException coreException) { - LOGGER.error("Transforming CoreException to Error Response :", coreException); + LOGGER.error(coreException.getMessage(), coreException); return generateResponse(Status.BAD_REQUEST, new ActivitySpecErrorResponse(coreException.getMessage())); } private Response transform(ConstraintViolationException validationException) { - LOGGER.error("Transforming ConstraintViolationException to Error Response :", validationException); + LOGGER.error("ConstraintViolationException Occurred :", validationException); Set> constraintViolationSet = validationException.getConstraintViolations(); String message; @@ -81,12 +81,12 @@ public class DefaultExceptionMapper implements ExceptionMapper { } private Response transform(Exception exception) { - LOGGER.error("Transforming Exception to Error Response " + exception); + LOGGER.error("Error occurred :", exception); return generateResponse(Status.INTERNAL_SERVER_ERROR, new ActivitySpecErrorResponse(exception.getMessage())); } private Response transform(JsonMappingException jsonMappingException) { - LOGGER.error("Transforming JsonMappingException to Error Response " + jsonMappingException); + LOGGER.error("Error Occurred during JSON mapping :", jsonMappingException); return generateResponse(Status.BAD_REQUEST, new ActivitySpecErrorResponse("Invalid Json Input")); } -- cgit 1.2.3-korg