Cleaned up content of MsoLogger
[so.git] / bpmn / so-bpmn-infrastructure-common / src / main / groovy / org / onap / so / bpmn / infrastructure / scripts / DoUpdateVfModule.groovy
index 641878b..47647bd 100644 (file)
@@ -326,8 +326,8 @@ public class DoUpdateVfModule extends VfModuleBase {
                        def sdncCallbackUrl = (String) UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
                        if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
                                def msg = 'Required variable \'mso.workflow.sdncadapter.callback\' is missing'
-                               logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
-                                               MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue());
+                               logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
+                                               MsoLogger.ErrorCode.UnknownError.getValue());
                                exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
                        }
 
@@ -335,8 +335,8 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
                }
@@ -376,8 +376,8 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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, 1002, 'Error in preparePrepareUpdateAAIVfModule(): ' + e.getMessage())
                }
@@ -427,16 +427,16 @@ public class DoUpdateVfModule extends VfModuleBase {
                        logger.debug(" is Cloud Region Good: " + execution.getVariable(prefix + "isCloudRegionGood"))
 
                } catch(BpmnError b){
-                       logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
-                                       "Rethrowing MSOWorkflowException", "BPMN", MsoLogger.getServiceName(),
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       "Rethrowing MSOWorkflowException", "BPMN",
                                        MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + b);
                        throw b
                }catch (Exception e) {
                        // try error
                        String errorMessage = "Bpmn error encountered in CreateVfModule flow. Unexpected Response from AAI - " + e.getMessage()
-                       logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        "AAI Query Cloud Region Failed. Exception - " + "\n" + errorMessage, "BPMN",
-                                       MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+                                       MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception occured during prepConfirmVolumeGroupTenant(): " + e.getMessage())
                }
                logger.trace('Exited ' + method)
@@ -541,8 +541,8 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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, 1002, 'Error in prepSDNCTopologyChg(): ' + e.getMessage())
                }
@@ -605,8 +605,8 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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, 1002, 'Error in prepSDNCTopologyQuery(): ' + e.getMessage())
                }
@@ -707,8 +707,8 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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, 1002, 'Error in prepVnfAdapterRest(): ' + e.getMessage())
                }
@@ -755,8 +755,8 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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, 1002, 'Error in prepUpdateAAIGenericVnf(): ' + e.getMessage())
                }
@@ -829,8 +829,8 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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, 1002, 'Error in prepUpdateAAIVfModule(): ' + e.getMessage())
                }
@@ -932,8 +932,8 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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, 1002, 'Error in prepSDNCTopologyAct(): ' + e.getMessage())
                }
@@ -953,16 +953,16 @@ public class DoUpdateVfModule extends VfModuleBase {
 
                try {
                        def WorkflowException workflowException = (WorkflowException) execution.getVariable('WorkflowException')
-                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                       logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        method + ' caught WorkflowException: ' + workflowException.getErrorMessage(), "BPMN",
-                                       MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue());
+                                       MsoLogger.ErrorCode.UnknownError.getValue());
 
                        logger.trace('Exited ' + method)
                } 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.buildWorkflowException(execution, 1002, 'Error in handleWorkflowException(): ' + e.getMessage())
                }
@@ -1040,8 +1040,8 @@ public class DoUpdateVfModule extends VfModuleBase {
                } 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, 1002, 'Error in queryAAIVfModule(): ' + e.getMessage())
                }