From 849f77fba3188261f817279ee1a3aed98de5f4e5 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Mon, 18 Dec 2017 11:58:35 -0500 Subject: 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 --- .../src/main/java/org/onap/ccsdk/sli/core/sli/MetricLogger.java | 2 +- .../src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicParser.java | 7 +------ 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 79989b514..e70d08a5f 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 ee260433a..51eb18e44 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); -- cgit 1.2.3-korg