Cleaned up content of MsoLogger
[so.git] / bpmn / MSOCommonBPMN / src / main / groovy / org / onap / so / bpmn / common / scripts / SDNCAdapterUtils.groovy
index b5ea12b..085e82c 100644 (file)
@@ -263,8 +263,8 @@ class SDNCAdapterUtils {
 
                        def callbackUrl = (String)UrnPropertiesReader.getVariable('mso.workflow.sdncadapter.callback',execution)
                        if (callbackUrl == null || callbackUrl.trim() == "") {
-                               logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
-                                               'mso:workflow:sdncadapter:callback URN is not set', "BPMN", MsoLogger.getServiceName(),
+                               logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                               'mso:workflow:sdncadapter:callback URN is not set', "BPMN",
                                                MsoLogger.ErrorCode.UnknownError.getValue());
                                workflowException(execution, 'Internal Error', 9999) // TODO: what message and error code?
                        }
@@ -401,8 +401,8 @@ class SDNCAdapterUtils {
 
                        def callbackUrl = (String)UrnPropertiesReader.getVariable('mso.workflow.sdncadapter.callback',execution)
                        if (callbackUrl == null || callbackUrl.trim() == "") {
-                               logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
-                                               'mso:workflow:sdncadapter:callback URN is not set', "BPMN", MsoLogger.getServiceName(),
+                               logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                               'mso:workflow:sdncadapter:callback URN is not set', "BPMN",
                                                MsoLogger.ErrorCode.UnknownError.getValue());
                                exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Internal Error - During PreProcess Request")
                        }
@@ -474,8 +474,8 @@ class SDNCAdapterUtils {
                } catch (BpmnError e) {
                        throw e;
                } catch (Exception e) {
-                       logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
-                                       'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(),
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       'Caught exception in ' + method, "BPMN",
                                        MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error")
                }
@@ -981,9 +981,9 @@ class SDNCAdapterUtils {
 
                                                }
                                        }else {
-                                               logger.warn("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_WARNING,
+                                               logger.warn("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_WARNING,
                                                                'sdncAdapter did not complete successfully, sdncAdapter Success Indicator was false ',
-                                                               "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError,
+                                                               "BPMN", MsoLogger.ErrorCode.UnknownError,
                                                                'sdncAdapter did not complete successfully, sdncAdapter Success Indicator was false ')
                                                execution.setVariable("L3HLAB_rollback", true)
                                                def msg = trinityExceptionUtil.intDataResponseCode(response, execution)
@@ -991,8 +991,8 @@ class SDNCAdapterUtils {
                                        }
 
                                        if (response == null || response.trim().equals("")) {
-                                               logger.warn("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_WARNING,
-                                                               'sdncAdapter workflow response is empty', "BPMN", MsoLogger.getServiceName(),
+                                               logger.warn("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_WARNING,
+                                                               'sdncAdapter workflow response is empty', "BPMN",
                                                                MsoLogger.ErrorCode.UnknownError, 'sdncAdapter workflow response is empty')
                                                execution.setVariable("L3HLAB_rollback", true)
                                                def msg = trinityExceptionUtil.buildException("Exception occurred while validating SDNC response " , execution)
@@ -1004,7 +1004,8 @@ class SDNCAdapterUtils {
                                } catch (BpmnError e) {
                                        throw e;
                                } catch (Exception e) {
-                                       logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+                                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), 'Caught ' +
+                                                       'exception in ' + method, "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                                        execution.setVariable(prefix+"ResponseCode",400)
                                        execution.setVariable("L3HLAB_rollback", true)
                                        def msg = trinityExceptionUtil.buildException("Exception occurred while validating SDNC response: " + e.getMessage(), execution)