summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gson/src/main/java/org/onap/policy/common/gson/GsonMessageBodyHandler.java6
-rw-r--r--gson/src/main/java/org/onap/policy/common/gson/JacksonHandler.java4
2 files changed, 8 insertions, 2 deletions
diff --git a/gson/src/main/java/org/onap/policy/common/gson/GsonMessageBodyHandler.java b/gson/src/main/java/org/onap/policy/common/gson/GsonMessageBodyHandler.java
index 6906696f..fc8e23ef 100644
--- a/gson/src/main/java/org/onap/policy/common/gson/GsonMessageBodyHandler.java
+++ b/gson/src/main/java/org/onap/policy/common/gson/GsonMessageBodyHandler.java
@@ -36,6 +36,8 @@ import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.ext.MessageBodyReader;
import javax.ws.rs.ext.MessageBodyWriter;
import javax.ws.rs.ext.Provider;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Provider that serializes and de-serializes JSON via gson.
@@ -45,6 +47,8 @@ import javax.ws.rs.ext.Provider;
@Produces(MediaType.WILDCARD)
public class GsonMessageBodyHandler implements MessageBodyReader<Object>, MessageBodyWriter<Object> {
+ public static final Logger logger = LoggerFactory.getLogger(GsonMessageBodyHandler.class);
+
/**
* Object to be used to serialize and de-serialize.
*/
@@ -55,6 +59,8 @@ public class GsonMessageBodyHandler implements MessageBodyReader<Object>, Messag
*/
public GsonMessageBodyHandler() {
this(new Gson());
+
+ logger.info("Using GSON for REST calls");
}
/**
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 a1c54afa..b2648b0b 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
@@ -37,6 +37,8 @@ public class JacksonHandler extends GsonMessageBodyHandler {
*/
public JacksonHandler() {
this(new GsonBuilder());
+
+ logger.info("Using GSON with Jackson behaviors for REST calls");
}
/**
@@ -49,8 +51,6 @@ public class JacksonHandler extends GsonMessageBodyHandler {
.registerTypeAdapterFactory(new JacksonMethodAdapterFactory())
.setExclusionStrategies(new JacksonExclusionStrategy())
.create());
-
- logger.info("Using GSON for REST calls");
}
}