diff options
author | Joss Armstrong <joss.armstrong@ericsson.com> | 2019-02-25 14:35:44 +0000 |
---|---|---|
committer | Takamune Cho <takamune.cho@att.com> | 2019-02-26 17:50:35 +0000 |
commit | 76c431ff25d09b69ea912f53ca96cbcdcb52a3fb (patch) | |
tree | bdf9d1baa6d85ea44d13218a80e93e8dda5f8517 /appc-config/appc-flow-controller/provider/src/main | |
parent | d6f7963013c9b16552509eb53381baef73740f8f (diff) |
Fix for timeout error when logging >1MB data
Potentially large logs moved to TRACE level, INFO level
logs limited in size and related tests updated
Issue-ID: APPC-1489
Change-Id: I9ea85e64380479d835da03ed2af3e4ab96ece67e
Signed-off-by: Joss Armstrong <joss.armstrong@ericsson.com>
Diffstat (limited to 'appc-config/appc-flow-controller/provider/src/main')
-rw-r--r-- | appc-config/appc-flow-controller/provider/src/main/java/org/onap/appc/flow/controller/executorImpl/GraphExecutor.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/onap/appc/flow/controller/executorImpl/GraphExecutor.java b/appc-config/appc-flow-controller/provider/src/main/java/org/onap/appc/flow/controller/executorImpl/GraphExecutor.java index 261d64e7a..10fc319a2 100644 --- a/appc-config/appc-flow-controller/provider/src/main/java/org/onap/appc/flow/controller/executorImpl/GraphExecutor.java +++ b/appc-config/appc-flow-controller/provider/src/main/java/org/onap/appc/flow/controller/executorImpl/GraphExecutor.java @@ -92,7 +92,7 @@ public class GraphExecutor implements FlowExecutorInterface { String parmName = (String) key; String parmValue = ctx.getAttribute(parmName); parms.put(parmName, parmValue); - log.info(fn + "Setting Key= " + parmName + "and Value = " + parmValue); + log.info(fn + "Setting Key= " + parmName + " and Value = " + parmValue); } Properties returnParams = @@ -105,7 +105,20 @@ public class GraphExecutor implements FlowExecutorInterface { while (e.hasMoreElements()) { String key = (String) e.nextElement(); - log.info("NEW KEY = " + key + " -- " + returnParams.getProperty(key)); + String property = returnParams.getProperty(key); + if (log.isTraceEnabled()) { + log.trace("NEW KEY = " + key + " -- " + property); + } + else { + if (property.length() > 255) { + log.info("NEW KEY = " + key + " -- " + property.substring(0, 255)); + log.info("\n...\n" + property.length() + + " characters in property, turn on TRACE logging to log entire property"); + } + else { + log.info("NEW KEY = " + key + " -- " + property); + } + } ctx.setAttribute(key, returnParams.getProperty(key)); } |