diff options
Diffstat (limited to 'appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/pattern/PatternNode.java')
-rw-r--r-- | appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/pattern/PatternNode.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/pattern/PatternNode.java b/appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/pattern/PatternNode.java index 4333cfd90..4d4ba6bd6 100644 --- a/appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/pattern/PatternNode.java +++ b/appc-config/appc-config-generator/provider/src/main/java/org/onap/sdnc/config/generator/pattern/PatternNode.java @@ -24,6 +24,8 @@ package org.onap.sdnc.config.generator.pattern; +import com.att.eelf.configuration.EELFLogger; +import com.att.eelf.configuration.EELFManager; import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; @@ -32,15 +34,13 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin; import org.onap.sdnc.config.generator.ConfigGeneratorConstant; import org.onap.sdnc.config.generator.tool.CheckDataTool; import org.onap.sdnc.config.generator.tool.LogParserTool; -import com.att.eelf.configuration.EELFLogger; -import com.att.eelf.configuration.EELFManager; public class PatternNode implements SvcLogicJavaPlugin { private static final EELFLogger log = EELFManager.getInstance().getLogger(PatternNode.class); public void parseErrorLog(Map<String, String> inParams, SvcLogicContext ctx) - throws SvcLogicException { + throws SvcLogicException { log.info("Received parseErroLog call with params : " + inParams); String responsePrefix = inParams.get(ConfigGeneratorConstant.INPUT_PARAM_RESPONSE_PRIFIX); try { @@ -52,21 +52,21 @@ public class PatternNode implements SvcLogicJavaPlugin { LogParserTool logParserTool = new LogParserTool(); String parsedError = logParserTool.parseErrorLog(logData); ctx.setAttribute(responsePrefix + ConfigGeneratorConstant.OUTPUT_PARAM_PARSED_ERROR, - parsedError); + parsedError); ctx.setAttribute(responsePrefix + ConfigGeneratorConstant.OUTPUT_PARAM_STATUS, - ConfigGeneratorConstant.OUTPUT_STATUS_SUCCESS); + ConfigGeneratorConstant.OUTPUT_STATUS_SUCCESS); } catch (Exception e) { ctx.setAttribute(responsePrefix + ConfigGeneratorConstant.OUTPUT_PARAM_STATUS, - ConfigGeneratorConstant.OUTPUT_STATUS_FAILURE); + ConfigGeneratorConstant.OUTPUT_STATUS_FAILURE); ctx.setAttribute(responsePrefix + ConfigGeneratorConstant.OUTPUT_PARAM_ERROR_MESSAGE, - e.getMessage()); + e.getMessage()); log.error("Failed in parsing error log " + e.getMessage()); throw new SvcLogicException(e.getMessage()); } } public void checkDataType(Map<String, String> inParams, SvcLogicContext ctx) - throws SvcLogicException { + throws SvcLogicException { log.info("Received checkDataType call with params : " + inParams); String responsePrefix = inParams.get(ConfigGeneratorConstant.INPUT_PARAM_RESPONSE_PRIFIX); try { @@ -77,14 +77,14 @@ public class PatternNode implements SvcLogicJavaPlugin { } String dataType = CheckDataTool.checkData(checkData); ctx.setAttribute(responsePrefix + ConfigGeneratorConstant.OUTPUT_PARAM_DATA_TYPE, - dataType); + dataType); ctx.setAttribute(responsePrefix + ConfigGeneratorConstant.OUTPUT_PARAM_STATUS, - ConfigGeneratorConstant.OUTPUT_STATUS_SUCCESS); + ConfigGeneratorConstant.OUTPUT_STATUS_SUCCESS); } catch (Exception e) { ctx.setAttribute(responsePrefix + ConfigGeneratorConstant.OUTPUT_PARAM_STATUS, - ConfigGeneratorConstant.OUTPUT_STATUS_FAILURE); + ConfigGeneratorConstant.OUTPUT_STATUS_FAILURE); ctx.setAttribute(responsePrefix + ConfigGeneratorConstant.OUTPUT_PARAM_ERROR_MESSAGE, - e.getMessage()); + e.getMessage()); log.error("Failed in checkDataType " + e.getMessage()); throw new SvcLogicException(e.getMessage()); } |