From c9fe67a5f211d93acf0feb34e6c6af3469a6eb4c Mon Sep 17 00:00:00 2001 From: nivetha <nivetha.mariappan@tarento.com> Date: Mon, 4 Apr 2022 17:07:37 +0530 Subject: [PATCH] logger info --- .../com/tarento/formservice/utils/ValidationService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/tarento/formservice/utils/ValidationService.java b/src/main/java/com/tarento/formservice/utils/ValidationService.java index 0678a00..ab4e721 100644 --- a/src/main/java/com/tarento/formservice/utils/ValidationService.java +++ b/src/main/java/com/tarento/formservice/utils/ValidationService.java @@ -6,6 +6,8 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import com.fasterxml.jackson.core.JsonProcessingException; @@ -19,6 +21,8 @@ import com.tarento.formservice.models.FormDetail; @Service public class ValidationService { + public static final Logger LOGGER = LoggerFactory.getLogger(ValidationService.class); + public String validateCreateForm(FormDetail form) throws JsonProcessingException { if (form == null) { @@ -136,7 +140,7 @@ public class ValidationService { } return dataObjectMap; } catch (Exception e) { - e.printStackTrace(); + LOGGER.error(String.format(Constants.EXCEPTION, "removeEmptyFields", e.getMessage())); } return dataObject; } -- GitLab