diff options
-rw-r--r-- | gson/pom.xml | 5 | ||||
-rw-r--r-- | gson/src/main/java/org/onap/policy/common/gson/JacksonHandler.java | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gson/pom.xml b/gson/pom.xml index 81b95497..8f6272a9 100644 --- a/gson/pom.xml +++ b/gson/pom.xml @@ -38,6 +38,11 @@ <dependencies> <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <scope>provided</scope> + </dependency> + <dependency> <groupId>org.glassfish.jersey.core</groupId> <artifactId>jersey-server</artifactId> <version>${jersey.version}</version> 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"); } } |