summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorChandan Ghosh <cghosh12@in.ibm.com>2019-01-17 16:23:21 +0530
committerChandan Ghosh <cghosh12@in.ibm.com>2019-01-21 16:15:50 +0530
commit4e418d684db244939d0a4d1df479b8935e085a96 (patch)
treef7ad6c6d3d7e2b16b05682bebe06c6c46d4a2792 /src/main/java
parent69d4c0a747053473355ee82aa426589324e50d82 (diff)
Added error logger in exception scenario
Added error logger in exception scenatio Issue-ID: AAI-2086 Change-Id: I47b222096ff9613821101e6f87c0bd75d2bf3f4e Signed-off-by: Chandan Ghosh <cghosh12@in.ibm.com>
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/onap/aai/spike/schema/RelationshipSchema.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/org/onap/aai/spike/schema/RelationshipSchema.java b/src/main/java/org/onap/aai/spike/schema/RelationshipSchema.java
index 6858783..7cddcb5 100644
--- a/src/main/java/org/onap/aai/spike/schema/RelationshipSchema.java
+++ b/src/main/java/org/onap/aai/spike/schema/RelationshipSchema.java
@@ -1,5 +1,4 @@
/**
- * ============LICENSE_START=======================================================
* Gizmo
* ================================================================================
* Copyright © 2017 AT&T Intellectual Property.
@@ -33,19 +32,23 @@ import java.util.stream.Collectors;
import com.google.common.collect.Multimap;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
+import org.onap.aai.cl.eelf.LoggerFactory;
import org.codehaus.jackson.map.ObjectMapper;
import org.onap.aai.edges.EdgeRule;
import org.onap.aai.spike.exception.SpikeException;
+import org.onap.aai.spike.logging.SpikeMsgs;
public class RelationshipSchema {
- private static final Gson gson = new GsonBuilder().create();
+
public static final String SCHEMA_SOURCE_NODE_TYPE = "from";
public static final String SCHEMA_TARGET_NODE_TYPE = "to";
public static final String SCHEMA_RELATIONSHIP_TYPE = "label";
public static final String SCHEMA_RULES_ARRAY = "rules";
+ private static org.onap.aai.cl.api.Logger logger =
+ LoggerFactory.getInstance().getLogger(RelationshipSchema.class.getName());
private Map<String, Map<String, Class<?>>> relations = new HashMap<>();
/**
@@ -61,7 +64,7 @@ public class RelationshipSchema {
try {
return resolveClass(p.getValue());
} catch (SpikeException | ClassNotFoundException e) {
- e.printStackTrace();
+ logger.error(SpikeMsgs.OXM_LOAD_ERROR, "Error in RelationshipSchema: " + e);
}
return null;
}));
@@ -85,7 +88,7 @@ public class RelationshipSchema {
try {
return resolveClass(p.getValue());
} catch (SpikeException | ClassNotFoundException e) {
- e.printStackTrace();
+ logger.error(SpikeMsgs.OXM_LOAD_ERROR, "Error in RelationshipSchema: " + e);
}
return null;
}));