summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2017-12-18 11:58:35 -0500
committerDan Timoney <dtimoney@att.com>2017-12-18 11:58:35 -0500
commit849f77fba3188261f817279ee1a3aed98de5f4e5 (patch)
tree6c1aedd38c54d3fdded71089fc67368eb053ef47
parent13cbc4e6633e4cef9cc33d10c11b9b177213acd9 (diff)
Service logic logging fixes
Update MetricLogger class to properly escape characters within body of response. Also, used SvcLogicGraph.toString method to simplify logging call. Change-Id: I6bcaaf3c67032df041c6d37372016990ff0199d3 Issue-ID: CCSDK-152 Signed-off-by: Dan Timoney <dtimoney@att.com>
-rw-r--r--sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/MetricLogger.java2
-rw-r--r--sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicParser.java7
2 files changed, 2 insertions, 7 deletions
diff --git a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/MetricLogger.java b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/MetricLogger.java
index 79989b51..e70d08a5 100644
--- a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/MetricLogger.java
+++ b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/MetricLogger.java
@@ -169,7 +169,7 @@ public class MetricLogger {
}
private void setResponseDescription(String responseDesc) {
- MDC.put(RESPONSE_DESCRIPTION, responseDesc);
+ MDC.put(RESPONSE_DESCRIPTION, formatString(responseDesc));
}
public String getInstanceUUID() {
diff --git a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicParser.java b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicParser.java
index ee260433..51eb18e4 100644
--- a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicParser.java
+++ b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicParser.java
@@ -487,13 +487,8 @@ public class SvcLogicParser {
for (SvcLogicGraph graph : graphs) {
- String module = graph.getModule();
- String rpc = graph.getRpc();
- String version = graph.getVersion();
- String mode = graph.getMode();
try {
- LOGGER.info("Saving SvcLogicGraph to database (module:{},rpc:{},mode:{},version:{})", module, rpc, mode,
- version);
+ LOGGER.info("Saving " + graph.toString() + " to database.");
store.store(graph);
} catch (Exception e) {
throw new SvcLogicException(e.getMessage(), e);