From 2917a67f12e32a7337e3a9f9b9fd3de4469a921c Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 15 Feb 2019 17:43:45 -0500 Subject: Add log message when gson used Added code to log a message when gson is used instead of jackson. Change-Id: I8cbb8ad8461cc364c3419aaa174cef2680c5a672 Issue-ID: POLICY-1428 Signed-off-by: Jim Hahn --- gson/src/main/java/org/onap/policy/common/gson/JacksonHandler.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gson/src/main/java') diff --git a/gson/src/main/java/org/onap/policy/common/gson/JacksonHandler.java b/gson/src/main/java/org/onap/policy/common/gson/JacksonHandler.java index d48649ea..a1c54afa 100644 --- a/gson/src/main/java/org/onap/policy/common/gson/JacksonHandler.java +++ b/gson/src/main/java/org/onap/policy/common/gson/JacksonHandler.java @@ -21,6 +21,8 @@ package org.onap.policy.common.gson; import com.google.gson.GsonBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Provider used to serialize and deserialize policy objects via gson using jackson @@ -28,6 +30,8 @@ import com.google.gson.GsonBuilder; */ public class JacksonHandler extends GsonMessageBodyHandler { + public static final Logger logger = LoggerFactory.getLogger(JacksonHandler.class); + /** * Constructs the object. */ @@ -45,6 +49,8 @@ public class JacksonHandler extends GsonMessageBodyHandler { .registerTypeAdapterFactory(new JacksonMethodAdapterFactory()) .setExclusionStrategies(new JacksonExclusionStrategy()) .create()); + + logger.info("Using GSON for REST calls"); } } -- cgit 1.2.3-korg