diff options
author | 2019-02-25 14:35:44 +0000 | |
---|---|---|
committer | 2019-02-26 17:50:35 +0000 | |
commit | 76c431ff25d09b69ea912f53ca96cbcdcb52a3fb (patch) | |
tree | bdf9d1baa6d85ea44d13218a80e93e8dda5f8517 /appc-config/appc-config-generator/provider/src/main/java/org | |
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-config-generator/provider/src/main/java/org')
-rw-r--r-- | appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/writer/FileWriterNode.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/writer/FileWriterNode.java b/appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/writer/FileWriterNode.java index 7e0ff015a..850efb572 100644 --- a/appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/writer/FileWriterNode.java +++ b/appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/writer/FileWriterNode.java @@ -5,6 +5,8 @@ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Copyright (C) 2017 Amdocs + * ================================================================================ + * Modifications Copyright (C) 2019 Ericsson * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,7 +42,20 @@ public class FileWriterNode implements SvcLogicJavaPlugin { public void writeFile(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException { - log.info("Received writeFile call with params : " + inParams); + if (log.isTraceEnabled()) { + log.trace("Received writeFile call with params : " + inParams); + } + else { + String mapString = inParams.toString(); + if (mapString.length() > 255) { + log.info("Received writeFile call with params : " + mapString.substring(0, 255)); + log.info("\n...\n" + mapString.length() + + " characters in parameters map, turn on TRACE logging to log entire parameter map"); + } + else { + log.info("Received writeFile call with params : " + mapString); + } + } String responsePrefix = inParams.get(ConfigGeneratorConstant.INPUT_PARAM_RESPONSE_PRIFIX); try { responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix + ".") : ""; |