Cleaned up content of MsoLogger
[so.git] / bpmn / so-bpmn-infrastructure-common / src / main / groovy / org / onap / so / bpmn / infrastructure / scripts / CreateVnfInfra.groovy
index 29eb47c..1c2975b 100644 (file)
@@ -168,7 +168,8 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
                                String sdncCallbackUrl = 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)
                                }
@@ -193,7 +194,8 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
                        logger.debug("Rethrowing MSOWorkflowException")
                        throw b
                }catch(Exception e){
-                       logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), " Error Occurred in CreateVnfInfra PreProcessRequest method", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), " Error Occurred in " +
+                                       "CreateVnfInfra PreProcessRequest method", "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
                        exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occurred in CreateVnfInfra PreProcessRequest")
 
                }
@@ -218,7 +220,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
                        execution.setVariable("CREVI_sentSyncResponse", true)
 
                } catch (Exception ex) {
-                       logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), " Error Occurred in CreateVnfInfra SendSyncResponse Process", "BPMN", MsoLogger.getServiceName(),
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), " Error Occurred in CreateVnfInfra SendSyncResponse Process", "BPMN",
                                MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
                        exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra SendSyncResponse Process")
 
@@ -244,7 +246,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
                        logger.debug("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest)
 
                }catch(Exception e){
-                       logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Exception Occurred Processing preProcessSDNCAssignRequest", "BPMN", MsoLogger.getServiceName(),
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Exception Occurred Processing preProcessSDNCAssignRequest", "BPMN",
                                MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during prepareProvision Method:\n" + e.getMessage())
                }
@@ -268,7 +270,8 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
                        logger.debug("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest)
 
                }catch(Exception e){
-                       logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Exception Occured Processing preProcessSDNCActivateRequest", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Exception Occured " +
+                                       "Processing preProcessSDNCActivateRequest", "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during  preProcessSDNCActivateRequest Method:\n" + e.getMessage())
                }
                logger.trace("COMPLETED  preProcessSDNCActivateRequest Process")
@@ -458,7 +461,8 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
                        logger.debug("obtained VNF list: " + vnfs)
                        
                        if (vnfs == null) {
-                               logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "No matching VNFs in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), "");
+                               logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "No matching " +
+                                               "VNFs in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid, "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "");
                                exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "No matching VNFs in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid)
                        }
                        
@@ -466,7 +470,8 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
                        JSONObject vnf = vnfs.get(0)
                        
                        if (vnf == null) {
-                               logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "No matching VNF in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), "");
+                               logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "No matching VNF" +
+                                               " in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid, "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "");
                                exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "No matching VNF in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid)
                        }                       
                        
@@ -538,7 +543,8 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
                                aaiCR.createAAILineOfBusiness(lineOfBusiness, vnfId)
                        }catch(Exception ex){
                                String msg = "Exception in LineOfBusiness. " + ex.getMessage();
-                               logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + ex)
+                               logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
+                                               MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + ex)
                                exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
                        }
                }