diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java
index 1157750..2dbf2fe 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -36,6 +38,8 @@
 import org.onap.so.logger.MessageEnum;
 import org.onap.so.logger.MsoLogger;
 import org.onap.so.utils.CryptoUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
@@ -53,6 +57,8 @@
 @Component
 public class BpmnRestClient {
 
+    private static Logger logger = LoggerFactory.getLogger(BpmnRestClient.class);
+
     public static final String DEFAULT_BPEL_AUTH = "admin:admin";
 
     public static final String ENCRYPTION_KEY_PROP = "org.onap.so.adapters.network.encryptionKey";
@@ -64,7 +70,6 @@
     private static final  String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA";
     @Autowired
     private UrnPropertiesReader urnPropertiesReader;
-    private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, BpmnRestClient.class);
 
     private static boolean noProperties = true;
 
@@ -101,7 +106,7 @@
         RequestConfig requestConfig =
                 RequestConfig.custom().setSocketTimeout(recipeTimeout).setConnectTimeout(recipeTimeout).setConnectionRequestTimeout(recipeTimeout).build();
         post.setConfig(requestConfig);
-        msoLogger.debug("call the bpmn,  url:" + recipeUri);
+        logger.debug("call the bpmn,  url: {}", recipeUri);
         String jsonReq = wrapResourceRequest(requestId, recipeTimeout, requestAction, serviceInstanceId, serviceType, requestDetails, recipeParamXsd);
 
         StringEntity input = new StringEntity(jsonReq);
@@ -177,10 +182,10 @@
             recipeRequest.setResourceInput(resourceInput);
             recipeRequest.setRecipeTimeout(recipeTimeoutInput);
             jsonReq = recipeRequest.toString();
-            msoLogger.trace("request body is " + jsonReq);
+            logger.trace("request body is {}", jsonReq);
         } catch(Exception e) {
-            msoLogger.error(MessageEnum.APIH_WARP_REQUEST, "Camunda", "wrapVIDRequest", MsoLogger.ErrorCode.BusinessProcesssError, "Error in APIH Warp request",
-                    e);
+            logger.error("{} {} {} {} {}", MessageEnum.APIH_WARP_REQUEST.toString(), "Camunda", "wrapVIDRequest",
+                MsoLogger.ErrorCode.BusinessProcesssError.getValue(), "Error in APIH Warp request", e);
         }
         return jsonReq;
     }
@@ -198,7 +203,7 @@
         try {
             return CryptoUtils.decrypt(prop, urnPropertiesReader.getVariable(encryptionKey));
         } catch(GeneralSecurityException e) {
-            msoLogger.debug("Security exception", e);
+            logger.debug("Security exception", e);
         }
         return defaultValue;
     }
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceInput.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceInput.java
index f574288..2119b2d 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceInput.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceInput.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -20,7 +22,6 @@
 package org.onap.so.bpmn.common.recipe;
 
 import org.onap.so.bpmn.core.domain.ModelInfo;
-import org.onap.so.logger.MsoLogger;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@@ -28,6 +29,8 @@
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.SerializationFeature;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * the inputs for the resource recipe
@@ -42,7 +45,7 @@
 @JsonRootName("variables")
 public class ResourceInput {
 
-	private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL, ResourceInput.class);
+	private static Logger logger = LoggerFactory.getLogger(ResourceInput.class);
 	
     @JsonProperty("resourceInstanceName")
     private String resourceInstanceName;
@@ -307,8 +310,8 @@
         String jsonStr = "";
         try {
             jsonStr = mapper.writeValueAsString(this);
-        } catch(JsonProcessingException e) {
-        	msoLogger.error("JsonProcessingException", e);
+        } catch (JsonProcessingException e) {
+            logger.error("JsonProcessingException", e);
         }
         return jsonStr;
     }
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceRecipeRequest.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceRecipeRequest.java
index 4c6edfa..d1e2658 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceRecipeRequest.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/ResourceRecipeRequest.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -20,14 +22,14 @@
 
 package org.onap.so.bpmn.common.recipe;
 
-import org.onap.so.logger.MsoLogger;
-
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
 import com.fasterxml.jackson.annotation.JsonRootName;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.SerializationFeature;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * java object of the resource recipe , it
@@ -37,7 +39,7 @@
 @JsonRootName("variables")
 public class ResourceRecipeRequest {
 
-	private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL, ResourceRecipeRequest.class);
+	private static Logger logger = LoggerFactory.getLogger(ResourceRecipeRequest.class);
 	
     @JsonProperty("resourceInput")
     private BpmnParam resourceInput;
@@ -145,15 +147,14 @@
 
 	@Override
     public String toString() {
-        ObjectMapper mapper = new ObjectMapper();
-        mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
-        String jsonStr = "ResourceRecipeRequest";
-        try {
-            jsonStr = mapper.writeValueAsString(this);
-        } catch(JsonProcessingException e) {
-        	msoLogger.error("JsonProcessingException", e);
-        }
+      ObjectMapper mapper = new ObjectMapper();
+      mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
+      String jsonStr = "ResourceRecipeRequest";
+      try {
+          jsonStr = mapper.writeValueAsString(this);
+      } catch (JsonProcessingException e) {
+          logger.error("JsonProcessingException", e);
+      }
         return jsonStr;
     }
-
 }
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
index 750f255..03f56b3 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
@@ -38,7 +38,6 @@
 import org.onap.so.bpmn.core.json.JsonUtils;
 import org.onap.so.client.HttpClient;
 import org.onap.so.client.HttpClientFactory;
-import org.onap.so.logger.MsoLogger;
 import org.onap.so.utils.TargetEntity;
 
 import com.fasterxml.jackson.core.JsonProcessingException;
@@ -46,6 +45,8 @@
 import com.fasterxml.jackson.databind.SerializationFeature;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ResourceRequestBuilder {
 
@@ -53,7 +54,7 @@
 
     private static String SERVICE_URL_SERVICE_INSTANCE = "/v2/serviceResources";
 
-    private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, ResourceRequestBuilder.class);
+    private static Logger logger = LoggerFactory.getLogger(ResourceRequestBuilder.class);
 
     static JsonUtils jsonUtil = new JsonUtils();
 
@@ -74,7 +75,7 @@
                 }
             }
         } catch (Exception e) {
-            LOGGER.error("not able to retrieve service order.");
+            logger.error("not able to retrieve service order.");
         }
         return resourceSequence;
 	}
@@ -161,7 +162,7 @@
            }
 
         } catch (Exception e) {
-            LOGGER.error("not able to retrieve service instance");
+            logger.error("not able to retrieve service instance");
         }
         return new HashMap();
     }
@@ -227,8 +228,8 @@
         mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
         try {
             return mapper.readValue(jsonstr, type);
-        } catch(IOException e) {
-            LOGGER.error("fail to unMarshal json" + e.getMessage ());
+        } catch (IOException e) {
+            logger.error("fail to unMarshal json {}", e.getMessage());
         }
         return null;
     }
@@ -239,8 +240,8 @@
         String jsonStr = null;
         try {
             jsonStr = mapper.writeValueAsString(srcObj);
-        } catch(JsonProcessingException e) {
-        	LOGGER.error("SdcToscaParserException", e);
+        } catch (JsonProcessingException e) {
+            logger.error("SdcToscaParserException", e);
         }
         return jsonStr;
     }
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/CryptoHandler.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/CryptoHandler.java
index 093dac3..0fd0d92 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/CryptoHandler.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/CryptoHandler.java
@@ -5,6 +5,8 @@
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -25,10 +27,11 @@
 import java.util.Properties;
 import org.onap.so.utils.CryptoUtils;
 
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class CryptoHandler implements ICryptoHandler {
-	private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CryptoHandler.class);
+	private static final Logger logger = LoggerFactory.getLogger(CryptoHandler.class);
 	private static final String GENERAL_SECURITY_EXCEPTION_PREFIX = "GeneralSecurityException :";
 	private static final String MSO_KEY = "aa3871669d893c7fb8abbcda31b88b4f";
 	private static final String PROPERTY_KEY = "mso.AaiEncrypted.Pwd";
@@ -40,7 +43,7 @@
 			keyProp.load (Thread.currentThread ().getContextClassLoader ().getResourceAsStream ("urn.properties"));
 			return CryptoUtils.decrypt((String) keyProp.get(PROPERTY_KEY), MSO_KEY);
 		} catch (GeneralSecurityException | IOException e) {
-			LOGGER.error(GENERAL_SECURITY_EXCEPTION_PREFIX + e.getMessage(), e);
+			logger.error(GENERAL_SECURITY_EXCEPTION_PREFIX + e.getMessage(), e);
 			return null;
 		}
 	}
@@ -51,7 +54,7 @@
 		try {
 			return CryptoUtils.encrypt(plainMsoPwd, MSO_KEY);
 		} catch (GeneralSecurityException e) {
-			LOGGER.error(GENERAL_SECURITY_EXCEPTION_PREFIX + e.getMessage(), e);
+			logger.error(GENERAL_SECURITY_EXCEPTION_PREFIX + e.getMessage(), e);
 			return null;
 		}
 	}
@@ -61,7 +64,7 @@
 		try {
 			return CryptoUtils.decrypt(encryptedPwd, MSO_KEY);
 		} catch (GeneralSecurityException e) {
-			LOGGER.error(GENERAL_SECURITY_EXCEPTION_PREFIX + e.getMessage(), e);
+			logger.error(GENERAL_SECURITY_EXCEPTION_PREFIX + e.getMessage(), e);
 			return null;
 		}
 	}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java
index df7b57f..6b178bd 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2018. Intel Corp. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -24,16 +26,14 @@
 import org.onap.so.db.catalog.beans.CloudSite;
 import org.onap.so.db.catalog.beans.HomingInstance;
 import org.onap.so.db.catalog.client.CatalogDbClient;
-import org.onap.so.logger.MsoLogger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
-import java.util.Arrays;
 import java.util.Optional;
 
 public class OofInfraUtils {
 
-    private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, OofInfraUtils.class);
+    private static final Logger logger = LoggerFactory.getLogger(OofInfraUtils.class);
 
     /**
      * This method creates a cloudsite in catalog database.
@@ -53,16 +53,16 @@
             getCloudsite = Optional.ofNullable(client.getCloudSite(cloudSite.getId(), endpoint + "/cloudSite/")).orElse(new CloudSite());
             if (!cloudSite.getId().equals(getCloudsite.getId())) {
                 client.postCloudSite(cloudSite);
-                LOGGER.debug("Did not findd cloudsite : " + cloudSite.getId());
-                LOGGER.debug("Will create cloudSite: " + cloudSite.toString());
+                logger.debug("Did not findd cloudsite : {}", cloudSite.getId());
+                logger.debug("Will create cloudSite: {}", cloudSite.toString());
             }
             else {
-                LOGGER.debug("Found cloudsite : " + cloudSite.getId());
-                LOGGER.debug("Will not create cloudSite: " + cloudSite.toString());
+                logger.debug("Found cloudsite : {}", cloudSite.getId());
+                logger.debug("Will not create cloudSite: {}", cloudSite.toString());
             }
         } catch (Exception e) {
-            LOGGER.debug("Error looking up or creating cloudsite : " + cloudSite.getId());
-            LOGGER.debug("CloudSite Lookup/Creation Error: " + e);
+            logger.debug("Error looking up or creating cloudsite : {}", cloudSite.getId());
+            logger.debug("CloudSite Lookup/Creation Error: " + e);
         }
 
 
@@ -83,8 +83,8 @@
         try {
             client.postHomingInstance(homingInstance);
         } catch (Exception exception) {
-            LOGGER.debug("Could not create HomingInstance : " + homingInstance.getServiceInstanceId());
-            LOGGER.debug("HomingInstance Creation Error: " + exception);
+            logger.debug("Could not create HomingInstance : {}", homingInstance.getServiceInstanceId());
+            logger.debug("HomingInstance Creation Error: {}", exception);
         }
 
     }
@@ -104,8 +104,8 @@
         try {
             return client.getHomingInstance(serviceInstanceId, endpoint + "/homingInstance/");
         } catch (Exception exception) {
-            LOGGER.debug("Could not get HomingInstance for serviceInstanceId : " + serviceInstanceId);
-            LOGGER.debug("Get HomingInstance Error: " + exception);
+            logger.debug("Could not get HomingInstance for serviceInstanceId : {}", serviceInstanceId);
+            logger.debug("Get HomingInstance Error: {}", exception);
         }
         return null;
     }
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java
index eb7290b..db7f1da 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java
@@ -5,6 +5,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -26,6 +28,8 @@
 
 import org.onap.so.logger.MessageEnum;
 import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
 
 /**
@@ -37,7 +41,7 @@
 @Component
 public class WorkflowContextHolder {
 
-	private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,WorkflowContextHolder.class);
+	private static Logger logger = LoggerFactory.getLogger(WorkflowContextHolder.class);
 	private static final String logMarker = "[WORKFLOW-CONTEXT-HOLDER]";
 	private static WorkflowContextHolder instance = null;
 	
@@ -67,14 +71,12 @@
 	}
 	
 	public void put(WorkflowContext context) {
-		msoLogger.debug(logMarker + " Adding context to the queue: "
-			+ context.getRequestId());
+		logger.debug("{} Adding context to the queue: {}", logMarker, context.getRequestId());
 		responseQueue.put(context);
 	}
 	
 	public void remove(WorkflowContext context) {
-		msoLogger.debug(logMarker + " Removing context from the queue: "
-			+ context.getRequestId());
+		logger.debug("{} Removing context from the queue: {}", logMarker, context.getRequestId());
 		responseQueue.remove(context);
 	}
 	
@@ -120,18 +122,20 @@
 				try {
 					WorkflowContext requestObject = responseQueue.take();
 					MsoLogger.setLogContext(requestObject.getRequestId(), null);
-					msoLogger.debug("Time remaining for request id: " + requestObject.getRequestId() + ":" + requestObject.getDelay(TimeUnit.MILLISECONDS));
-					msoLogger.debug("Preparing timeout response for " + requestObject.getProcessKey() + ":" + ":" + requestObject.getRequestId());
+					logger.debug("Time remaining for request id: {}:{}", requestObject.getRequestId(), requestObject
+						.getDelay
+						(TimeUnit.MILLISECONDS));
+					logger.debug("Preparing timeout response for {}:{}", requestObject.getProcessKey(), requestObject
+						.getRequestId());
 				} catch (InterruptedException e) {
 					Thread.currentThread().interrupt();
 				} catch (Exception e) {
-					msoLogger.debug("WorkflowContextHolder timeout thread caught exception: " + e);
-				msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(), 
-						MsoLogger.ErrorCode.UnknownError, "Error in WorkflowContextHolder timeout thread");
-				
+					logger.debug("WorkflowContextHolder timeout thread caught exception: ", e);
+					logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN", MsoLogger.getServiceName(),
+							MsoLogger.ErrorCode.UnknownError.getValue(), "Error in WorkflowContextHolder timeout thread");
 				}
 			}
-			msoLogger.debug("WorkflowContextHolder timeout thread interrupted, quitting");
+			logger.debug("WorkflowContextHolder timeout thread interrupted, quitting");
 		}
 	}
 }
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestParameters.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestParameters.java
index 1e39070..3761d26 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestParameters.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestParameters.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -25,20 +27,20 @@
 import java.util.List;
 import java.util.Map;
 
-import org.onap.so.logger.MsoLogger;
-
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonInclude.Include;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.ObjectWriter;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonRootName;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @JsonRootName(value = "requestParameters")
 @JsonInclude(Include.NON_DEFAULT)
 public class RequestParameters implements Serializable {
 
-	private static final MsoLogger log = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, RequestParameters.class);
+	private static final Logger logger = LoggerFactory.getLogger(RequestParameters.class);
 
 	private static final long serialVersionUID = -5979049912538894930L;
 	@JsonProperty("subscriptionServiceType")
@@ -122,7 +124,7 @@
 		try{
 			json = ow.writeValueAsString(this);
 		}catch (Exception e){
-			log.error("Unable to convert Sniro Manager Request to string", e);
+			logger.error("Unable to convert Sniro Manager Request to string", e);
 		}
 		return json;
 	}
@@ -133,4 +135,4 @@
 				+ subscriptionServiceType + ", userParams=" + userParams
 				+ ", aLaCarte=" + aLaCarte + "]";
 	}
-}
\ No newline at end of file
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
index fbff062..fb30946 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -75,7 +77,6 @@
 import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
 import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization;
 import org.onap.so.db.request.beans.InfraActiveRequests;
-import org.onap.so.logger.MsoLogger;
 import org.onap.so.serviceinstancebeans.CloudConfiguration;
 import org.onap.so.serviceinstancebeans.ModelInfo;
 import org.onap.so.serviceinstancebeans.ModelType;
@@ -87,17 +88,18 @@
 import org.onap.so.serviceinstancebeans.Resources;
 import org.onap.so.serviceinstancebeans.VfModules;
 import org.onap.so.serviceinstancebeans.Vnfs;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.SerializationFeature;
 
 @Component("BBInputSetup")
 public class BBInputSetup implements JavaDelegate {
 
-	private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, BBInputSetup.class);
+	private static final Logger logger = LoggerFactory.getLogger(BBInputSetup.class);
 	private static final String FLOW_VAR_NAME = "flowToBeCalled";
 	private static final String LOOKUP_KEY_MAP_VAR_NAME = "lookupKeyMap";
 	private static final String GBB_INPUT_VAR_NAME = "gBBInput";
@@ -157,7 +159,7 @@
 			outputBB = this.getGBB(executeBB, lookupKeyMap, requestAction, aLaCarte, resourceId, vnfType);
 			ObjectMapper mapper = new ObjectMapper();
 			mapper.enable(SerializationFeature.INDENT_OUTPUT);
-			msoLogger.debug("GeneralBB: " + mapper.writeValueAsString(outputBB));
+			logger.debug("GeneralBB: " + mapper.writeValueAsString(outputBB));
 
 			setHomingFlag(outputBB, homing, lookupKeyMap);
 
@@ -170,7 +172,7 @@
 			execution.setVariable("RetryCount", 1);
 			execution.setVariable("handlingCode", "Success");
 		} catch (Exception e) {
-			msoLogger.error(e);
+			logger.error("Exception occurred", e);
 			exceptionUtil.buildAndThrowWorkflowException(execution, 7000, e.getMessage());
 		}
 	}
@@ -244,8 +246,8 @@
 					resourceId, vnfType);
 			return this.populateGBBWithSIAndAdditionalInfo(requestDetails, serviceInstance, executeBB, requestAction, null);
 		} else {
-			msoLogger.debug("Related Service Instance from AAI: " + aaiServiceInstance);
-			msoLogger.debug("Related Service Instance Model Info from AAI: " + service);
+			logger.debug("Related Service Instance from AAI: {}", aaiServiceInstance);
+			logger.debug("Related Service Instance Model Info from AAI: {}", service);
 			throw new Exception("Could not find relevant information for related Service Instance");
 		}
 	}
@@ -419,7 +421,7 @@
 				mapCatalogVfModule(vfModule, modelInfo, service, vnfModelCustomizationUUID);
 			}
 		} else {
-			msoLogger.debug("Related VNF instance Id not found:  " + lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID));
+			logger.debug("Related VNF instance Id not found: {}", lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID));
 			throw new Exception("Could not find relevant information for related VNF");
 		}
 	}
@@ -526,7 +528,7 @@
 				mapCatalogVolumeGroup(volumeGroup, modelInfo, service, vnfModelCustomizationUUID);
 			}
 		} else {
-			msoLogger.debug("Related VNF instance Id not found:  " + lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID));
+			logger.debug("Related VNF instance Id not found: {}", lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID));
 			throw new Exception("Could not find relevant information for related VNF");
 		}
 	}
@@ -968,10 +970,10 @@
 					this.populateL3Network(null, networkModelInfo, service, bbName, serviceInstance, lookupKeyMap,
 							networkId, null);
 				} else {
-					msoLogger.debug("Could not find a network customization with key: " + key);
+					logger.debug("Could not find a network customization with key: {}", key);
 				}
 			} else {
-				msoLogger.debug("Orchestrating on Collection Network Resource Customization");
+				logger.debug("Orchestrating on Collection Network Resource Customization");
 				CollectionNetworkResourceCustomization collectionNetworkResourceCust = bbInputSetupUtils.getCatalogCollectionNetworkResourceCustByID(key);
 				L3Network l3Network = getVirtualLinkL3Network(lookupKeyMap, bbName, key, networkId, collectionNetworkResourceCust, serviceInstance);
 				NetworkResourceCustomization networkResourceCustomization = 
@@ -1039,8 +1041,8 @@
 			serviceInstance.setModelInfoServiceInstance(this.mapperLayer.mapCatalogServiceIntoServiceInstance(service));
 			gBB = populateGBBWithSIAndAdditionalInfo(requestDetails, serviceInstance, executeBB, requestAction, null);
 		} else {
-			msoLogger.debug("Related Service Instance from AAI: " + aaiServiceInstance);
-			msoLogger.debug("Related Service Instance Model Info from AAI: " + service);
+			logger.debug("Related Service Instance from AAI: {}", aaiServiceInstance);
+			logger.debug("Related Service Instance Model Info from AAI: {}", service);
 			throw new Exception("Could not find relevant information for related Service Instance");
 		}
 		ServiceInstance serviceInstance = gBB.getServiceInstance();
@@ -1212,7 +1214,7 @@
 			if(configurationCust != null) {
 				this.populateConfiguration(configurationModelInfo, service, bbName, serviceInstance, lookupKeyMap, configurationId, null, executeBB.getConfigurationResourceKeys());
 			} else {
-				msoLogger.debug("Could not find a configuration customization with key: " + key);
+				logger.debug("Could not find a configuration customization with key: {}", key);
 			}
 		}
 		return gBB;
@@ -1276,7 +1278,7 @@
 			org.onap.aai.domain.yang.CloudRegion aaiCloudRegion = bbInputSetupUtils.getCloudRegion(cloudConfiguration);
 			return mapperLayer.mapCloudRegion(cloudConfiguration, aaiCloudRegion);
 		} else {
-			msoLogger.debug("Could not find any cloud configuration for this request.");
+			logger.debug("Could not find any cloud configuration for this request.");
 			return null;
 		}
 	}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
index 641f7f5..d6597ec 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -78,9 +80,10 @@
 import org.onap.so.db.catalog.beans.VfModuleCustomization;
 import org.onap.so.db.catalog.beans.VnfResourceCustomization;
 import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
-import org.onap.so.logger.MsoLogger;
 import org.onap.so.serviceinstancebeans.CloudConfiguration;
 import org.onap.so.serviceinstancebeans.RequestDetails;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
 
 @Component("BBInputSetupMapperLayer")
@@ -88,8 +91,7 @@
 	private static final String USER_PARAM_NAME_KEY = "name";
     private static final String USER_PARAM_VALUE_KEY = "value";
 
-	private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,
-			BBInputSetupMapperLayer.class);
+	private static final Logger logger = LoggerFactory.getLogger(BBInputSetupMapperLayer.class);
 
 	private ModelMapper modelMapper = new ModelMapper();
 
@@ -490,4 +492,4 @@
 			CollectionNetworkResourceCustomization collectionNetworkResourceCust) {
 		return modelMapper.map(collectionNetworkResourceCust, NetworkResourceCustomization.class);
 	}
-}
\ No newline at end of file
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
index 4617fc4..b3b4559 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -55,9 +57,10 @@
 import org.onap.so.db.catalog.client.CatalogDbClient;
 import org.onap.so.db.request.beans.InfraActiveRequests;
 import org.onap.so.db.request.client.RequestsDbClient;
-import org.onap.so.logger.MsoLogger;
 import org.onap.so.serviceinstancebeans.CloudConfiguration;
 import org.onap.so.serviceinstancebeans.RequestDetails;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -68,7 +71,7 @@
 @Component("BBInputSetupUtils")
 public class BBInputSetupUtils {
 
-	private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, BBInputSetupUtils.class);
+	private static final Logger logger = LoggerFactory.getLogger(BBInputSetupUtils.class);
 	private ObjectMapper objectMapper = new ObjectMapper();
 	private static final String REQUEST_ERROR = "Could not find request.";
 
@@ -86,7 +89,7 @@
 			request.setVnfId(vnfId);
 			this.requestsDbClient.updateInfraActiveRequests(request);
 		} else {
-			msoLogger.debug(REQUEST_ERROR);
+			logger.debug(REQUEST_ERROR);
 		}
 	}
 
@@ -95,7 +98,7 @@
 			request.setVfModuleId(vfModuleId);
 			this.requestsDbClient.updateInfraActiveRequests(request);
 		} else {
-			msoLogger.debug(REQUEST_ERROR);
+			logger.debug(REQUEST_ERROR);
 		}
 	}
 
@@ -104,7 +107,7 @@
 			request.setVolumeGroupId(volumeGroupId);
 			this.requestsDbClient.updateInfraActiveRequests(request);
 		} else {
-			msoLogger.debug(REQUEST_ERROR);
+			logger.debug(REQUEST_ERROR);
 		}
 	}
 
@@ -113,7 +116,7 @@
 			request.setNetworkId(networkId);
 			this.requestsDbClient.updateInfraActiveRequests(request);
 		} else {
-			msoLogger.debug(REQUEST_ERROR);
+			logger.debug(REQUEST_ERROR);
 		}
 	}
 	
@@ -226,7 +229,7 @@
 								customer.getServiceSubscription().getServiceType())
 						.queryParam("service-instance-name", serviceInstanceName).depth(Depth.TWO))
 				.orElseGet(() -> {
-					msoLogger.debug("No Service Instance matched by name");
+					logger.debug("No Service Instance matched by name");
 					return null;
 				});
 	}
@@ -254,7 +257,7 @@
 				AAIUriFactory.createResourceUri(AAIObjectPlurals.SERVICE_INSTANCE, globalCustomerId, serviceType)
 						.queryParam("service-instance-name", serviceInstanceName).depth(Depth.TWO))
 				.orElseGet(() -> {
-					msoLogger.debug("No Service Instance matched by name");
+					logger.debug("No Service Instance matched by name");
 					return null;
 				});
 	}
@@ -299,7 +302,7 @@
 		return this.injectionHelper.getAaiClient().get(Configuration.class,
 				AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId).depth(Depth.ONE))
 				.orElseGet(() -> {
-					msoLogger.debug("No Configuration matched by id");
+					logger.debug("No Configuration matched by id");
 					return null;
 				});
 	}
@@ -309,7 +312,7 @@
 		return this.injectionHelper.getAaiClient().get(GenericVnf.class,
 				AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId).depth(Depth.ONE))
 				.orElseGet(() -> {
-					msoLogger.debug("No Generic Vnf matched by id");
+					logger.debug("No Generic Vnf matched by id");
 					return null;
 				});
 	}
@@ -318,7 +321,7 @@
 		return this.injectionHelper.getAaiClient().get(VolumeGroup.class,
 				AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, cloudOwnerId, cloudRegionId, volumeGroupId).depth(Depth.ONE))
 				.orElseGet(() -> {
-					msoLogger.debug("No Generic Vnf matched by id");
+					logger.debug("No Generic Vnf matched by id");
 					return null;
 				});
 	}
@@ -327,7 +330,7 @@
 		return this.injectionHelper.getAaiClient().get(VfModule.class,
 				AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId).depth(Depth.ONE))
 				.orElseGet(() -> {
-					msoLogger.debug("No Generic Vnf matched by id");
+					logger.debug("No Generic Vnf matched by id");
 					return null;
 				});
 	}
@@ -337,7 +340,7 @@
 		return this.injectionHelper.getAaiClient().get(L3Network.class,
 				AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, networkId).depth(Depth.ONE))
 				.orElseGet(() -> {
-					msoLogger.debug("No Generic Vnf matched by id");
+					logger.debug("No Generic Vnf matched by id");
 					return null;
 				});
 		
@@ -349,7 +352,7 @@
 		Optional<L3Networks> networks = injectionHelper.getAaiClient().get(L3Networks.class, uri);
 		L3Network network = null;
 		if (!networks.isPresent()) {
-			msoLogger.debug("No Networks matched by name");
+			logger.debug("No Networks matched by name");
 			return Optional.empty();
 		} else {
 			if (networks.get().getL3Network().size() > 1) {
@@ -367,7 +370,7 @@
 		Optional<GenericVnfs> vnfs = injectionHelper.getAaiClient().get(GenericVnfs.class, uri);
 		GenericVnf vnf = null;
 		if (!vnfs.isPresent()) {
-			msoLogger.debug("No Vnfs matched by name");
+			logger.debug("No Vnfs matched by name");
 			return Optional.empty();
 		} else {
 			 if (vnfs.get().getGenericVnf().size() > 1) {
@@ -385,7 +388,7 @@
 		Optional<VolumeGroups> volumeGroups = injectionHelper.getAaiClient().get(VolumeGroups.class, uri);
 		VolumeGroup volumeGroup = null;
 		if (!volumeGroups.isPresent()) {
-			msoLogger.debug("No VolumeGroups matched by name");
+			logger.debug("No VolumeGroups matched by name");
 			return Optional.empty();
 		} else {
 			if (volumeGroups.get().getVolumeGroup().size() > 1) {
@@ -403,7 +406,7 @@
 		Optional<VolumeGroups> volumeGroups = injectionHelper.getAaiClient().get(VolumeGroups.class, uri);
 		VolumeGroup volumeGroup = null;
 		if (!volumeGroups.isPresent()) {
-			msoLogger.debug("No VolumeGroups matched by name");
+			logger.debug("No VolumeGroups matched by name");
 			return Optional.empty();
 		} else {
 			if (volumeGroups.get().getVolumeGroup().size() > 1) {
@@ -414,4 +417,4 @@
 			return Optional.of(volumeGroup);
 		}
 	}
-}
\ No newline at end of file
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAI.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAI.java
index d7d1fec..7fcc613 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAI.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/CloudInfoFromAAI.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -31,7 +33,8 @@
 import org.onap.so.client.aai.AAIObjectType;
 import org.onap.so.client.aai.entities.AAIResultWrapper;
 import org.onap.so.client.aai.entities.Relationships;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -40,7 +43,7 @@
 @Component
 public class CloudInfoFromAAI {
 
-	private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CloudInfoFromAAI.class);
+	private static final Logger logger = LoggerFactory.getLogger(CloudInfoFromAAI.class);
 	@Autowired
 	private BBInputSetupUtils bbInputSetupUtils;
 	
@@ -63,13 +66,13 @@
 					new AAICommonObjectMapperProvider().getMapper().writeValueAsString(aaiL3Network));
 			relationshipsOp = getRelationshipsFromWrapper(networkWrapper);
 		} else {
-			msoLogger.debug("BBInputSetup could not find a cloud region or tenant, since there are no resources under the SI.");
+			logger.debug("BBInputSetup could not find a cloud region or tenant, since there are no resources under the SI.");
 			return Optional.empty();
 		}
 		if (relationshipsOp.isPresent()) {
 			return getRelatedCloudRegionAndTenant(relationshipsOp.get());
 		} else {
-			msoLogger.debug("BBInputSetup could not find a cloud region or tenant");
+			logger.debug("BBInputSetup could not find a cloud region or tenant");
 			return Optional.empty();
 		}
 	}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java
index ee7999f..054198f 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -33,7 +35,8 @@
 import org.onap.so.db.catalog.client.CatalogDbClient;
 import org.onap.so.db.request.beans.InfraActiveRequests;
 import org.onap.so.db.request.client.RequestsDbClient;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.env.Environment;
 import org.springframework.stereotype.Component;
@@ -41,8 +44,7 @@
 @Component
 public class ExecuteBuildingBlockRainyDay {
 
-	private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,
-			ExecuteBuildingBlockRainyDay.class);
+	private static final Logger logger = LoggerFactory.getLogger(ExecuteBuildingBlockRainyDay.class);
 	public static final String HANDLING_CODE = "handlingCode";
 
 	@Autowired
@@ -65,7 +67,7 @@
 			String RetryDuration = "PT" + retryTimeToWait + "S";
 			execution.setVariable("RetryDuration", RetryDuration);
 		} catch (Exception e) {
-			msoLogger.error(e);
+			logger.error("Exception occurred", e);
 			throw new BpmnError("Unknown error incrementing retry counter");
 		}
 	}
@@ -125,7 +127,7 @@
 					// Extract error data to be returned to WorkflowAction
 					execution.setVariable("WorkflowExceptionErrorMessage", workflowException.getErrorMessage());
 				} catch (Exception e) {
-					msoLogger.error("No WorkflowException Found",e);
+					logger.error("No WorkflowException Found",e);
 				}
 				RainyDayHandlerStatus rainyDayHandlerStatus;
 				rainyDayHandlerStatus = catalogDbClient
@@ -163,25 +165,25 @@
 						request.setRetryStatusMessage("Retries have been exhausted.");
 						requestDbclient.updateInfraActiveRequests(request);
 					} catch (Exception ex) {
-						msoLogger.error("Failed to update Request Db Infra Active Requests with Retry Status",ex);
+						logger.error("Failed to update Request Db Infra Active Requests with Retry Status",ex);
 					}
 				}
 				if (handlingCode.equals("RollbackToAssigned") && !aLaCarte) {
 					handlingCode = "Rollback";
 				}
 			}
-			msoLogger.debug("RainyDayHandler Status Code is: " + handlingCode);
+			logger.debug("RainyDayHandler Status Code is: {}", handlingCode);
 			execution.setVariable(HANDLING_CODE, handlingCode);
 		} catch (Exception e) {
 			String code = this.environment.getProperty(defaultCode);
-			msoLogger.error("Failed to determine RainyDayHandler Status. Seting handlingCode = "+ code, e);
+			logger.error("Failed to determine RainyDayHandler Status. Seting handlingCode = {}", code, e);
 			execution.setVariable(HANDLING_CODE, code);
 		}
 		try{
 			int envMaxRetries = Integer.parseInt(this.environment.getProperty(maxRetries));
 			execution.setVariable("maxRetries", envMaxRetries);
 		} catch (Exception ex) {
-			msoLogger.error("Could not read maxRetries from config file. Setting max to 5 retries");
+			logger.error("Could not read maxRetries from config file. Setting max to 5 retries");
 			execution.setVariable("maxRetries", 5);
 		}
 	}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java
index a212668..79f4a07 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -33,7 +35,8 @@
 import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
 import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
 import org.onap.so.client.exception.BBObjectNotFoundException;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
 
 import com.google.common.base.CaseFormat;
@@ -41,7 +44,7 @@
 @Component
 public class ExtractPojosForBB {
 
-	private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ExtractPojosForBB.class);
+	private static final Logger logger = LoggerFactory.getLogger(ExtractPojosForBB.class);
 	
 	public <T> T extractByKey(BuildingBlockExecution execution, ResourceKey key, String value)
 			throws BBObjectNotFoundException {
@@ -93,7 +96,8 @@
 		} catch (BBObjectNotFoundException e) { // re-throw parent object not found
 			throw e;
 		} catch (Exception e) { // convert all other exceptions to object not found
-			msoLogger.warnSimple("BBObjectNotFoundException in ExtractPojosForBB", "BBObject " + key + " was not found in gBBInput using reference value: " + value);
+			logger.warn("BBObjectNotFoundException in ExtractPojosForBB", "BBObject " + key + " was not found in "
+				+ "gBBInput using reference value: " + value);
 			throw new BBObjectNotFoundException(key, value);
 		}
 		
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClient.java
index af7c608..cbedefe 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClient.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClient.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -27,7 +29,8 @@
 import org.onap.so.client.avpn.dmaap.beans.InstanceReferences;
 import org.onap.so.client.avpn.dmaap.beans.RequestStatus;
 import org.onap.so.client.exception.MapperException;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -37,7 +40,7 @@
 @Component
 public class DmaapPropertiesClient {
 
-	private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DmaapPropertiesClient.class);
+	private static final Logger logger = LoggerFactory.getLogger(DmaapPropertiesClient.class);
 
 	@Autowired
 	private Provider<GlobalDmaapPublisher> dmaapPublisher;
@@ -62,7 +65,7 @@
 		try {
 			return new ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(dmaapBean);
 		} catch (JsonProcessingException e) {
-			msoLogger.error(e);
+			logger.error("Exception occurred", e);
 			throw new MapperException(e.getMessage());
 		}
 	}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
index 459ef66..d43218c 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -27,16 +29,18 @@
 import org.onap.so.bpmn.core.WorkflowException;
 import org.onap.so.logger.MessageEnum;
 import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
 
 @Component
 public class ExceptionBuilder {
-	private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ExceptionBuilder.class);
+	private static final Logger logger = LoggerFactory.getLogger(ExceptionBuilder.class);
 
 	public void buildAndThrowWorkflowException(BuildingBlockExecution execution, int errorCode, Exception exception) {
 		String msg = "Exception in %s.%s ";
 		try{
-			msoLogger.error(exception);
+			logger.error("Exception occurred", exception);
 
 			String errorVariable = "Error%s%s";
 
@@ -50,11 +54,12 @@
 				}
 			}
 
-			msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, msg.toString());
+			logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
+				MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), msg.toString());
 			execution.setVariable(errorVariable, exception.getMessage());
 		} catch (Exception ex){
 			//log trace, allow process to complete gracefully
-			msoLogger.error(ex);
+			logger.error("Exception occurred", ex);
 		}
 
 		if (exception.getMessage() != null)
@@ -65,7 +70,7 @@
 	public void buildAndThrowWorkflowException(DelegateExecution execution, int errorCode, Exception exception) {
 		String msg = "Exception in %s.%s ";
 		try{
-			msoLogger.error(exception);
+			logger.error("Exception occurred", exception);
 
 			String errorVariable = "Error%s%s";
 
@@ -78,11 +83,12 @@
 					break;
 				}
 			}
-			msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, msg.toString());
+			logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
+				MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), msg.toString());
 			execution.setVariable(errorVariable, exception.getMessage());
 		} catch (Exception ex){
 			//log trace, allow process to complete gracefully
-			msoLogger.error(ex);
+			logger.error("Exception occurred", ex);
 		}
 
 		if (exception.getMessage() != null)
@@ -98,13 +104,13 @@
 
 	public void buildAndThrowWorkflowException(DelegateExecution execution, int errorCode, String errorMessage) {
 		String processKey = getProcessKey(execution);
-		msoLogger.info("Building a WorkflowException for Subflow");
+		logger.info("Building a WorkflowException for Subflow");
 
 		WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
 		execution.setVariable("WorkflowException", exception);
 		execution.setVariable("WorkflowExceptionErrorMessage", errorMessage);
-		msoLogger.info("Outgoing WorkflowException is " + exception);
-		msoLogger.info("Throwing MSOWorkflowException");
+		logger.info("Outgoing WorkflowException is {}", exception);
+		logger.info("Throwing MSOWorkflowException");
 		throw new BpmnError("MSOWorkflowException");
 	}
 	
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java
index a513acc..63e5ccb 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -27,7 +29,8 @@
 import org.camunda.bpm.application.PreUndeploy;
 import org.camunda.bpm.application.ProcessApplicationInfo;
 import org.camunda.bpm.engine.ProcessEngine;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -49,8 +52,7 @@
 				@Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class)})
 public class MSOCommonApplication {
 
-	private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,
-			MSOCommonApplication.class);
+	private static final Logger logger = LoggerFactory.getLogger(MSOCommonApplication.class);
 
 	@Value("${mso.async.core-pool-size}")
 	private int corePoolSize;
@@ -78,20 +80,11 @@
 
 	@PostDeploy
 	public void postDeploy(ProcessEngine processEngineInstance) {
-		long startTime = System.currentTimeMillis();
-
-		msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
-				"Post deployment complete...");
 	}
 
 	@PreUndeploy
 	public void cleanup(ProcessEngine processEngine, ProcessApplicationInfo processApplicationInfo,
 			List<ProcessEngine> processEngines) {
-		long startTime = System.currentTimeMillis();
-
-		msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
-				"Pre Undeploy complete...");
-
 	}
 
 	@Bean
@@ -105,4 +98,4 @@
 		executor.initialize();
 		return executor;
 	}
-}
\ No newline at end of file
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/FileUtil.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/FileUtil.java
index b6acdf7..6a3668b 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/FileUtil.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/FileUtil.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -22,7 +24,8 @@
 
 import java.io.IOException;
 import java.io.InputStream;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * 
@@ -35,7 +38,7 @@
  */
 public class FileUtil {
 
-    private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, FileUtil.class);
+    private static final Logger logger = LoggerFactory.getLogger(FileUtil.class);
     
 	/**
 	 * Read the specified resource file and return the contents as a String.
@@ -58,7 +61,7 @@
 				return "";
 			}
 		} catch (IOException e) {
-		    LOGGER.debug("Exception:", e);
+		    logger.debug("Exception:", e);
 			return "";
 		}
 	}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterMockTransformer.java
index f129164..11788be 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterMockTransformer.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterMockTransformer.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -24,7 +26,6 @@
 
 import org.onap.so.client.HttpClient;
 import org.onap.so.client.HttpClientFactory;
-import org.onap.so.logger.MsoLogger;
 import org.onap.so.utils.TargetEntity;
 
 import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
@@ -33,6 +34,8 @@
 import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer;
 import com.github.tomakehurst.wiremock.http.Request;
 import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * 
@@ -41,7 +44,7 @@
  */
 public class SDNCAdapterMockTransformer extends ResponseDefinitionTransformer {
 
-	private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SDNCAdapterMockTransformer.class);
+	private static final Logger logger = LoggerFactory.getLogger(SDNCAdapterMockTransformer.class);
 	private String callbackResponse;
 	private String requestId;
 	
@@ -74,7 +77,7 @@
 		String requestId = requestBody.substring(requestBody.indexOf("<sdncadapter:RequestId>")+23, requestBody.indexOf("</sdncadapter:RequestId>"));
 
 		callbackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
-		System.out.println("callbackResponse:" + callbackResponse);
+		logger.info("callbackResponse:" + callbackResponse);
 		
 		if (this.requestId != null) {
 			callbackResponse = callbackResponse.replace(this.requestId, requestId);
@@ -90,7 +93,7 @@
 		}
 		
 		//Kick off callback thread
-		System.out.println("callback Url:" + callbackUrl + ":delay:" + delay);
+		logger.info("callback Url:" + callbackUrl + ":delay:" + delay);
 		CallbackResponseThread calbackResponseThread = new CallbackResponseThread(callbackUrl,callbackResponse, delay);
 		calbackResponseThread.start();
 		
@@ -128,16 +131,16 @@
 				//Delay sending callback response
 				sleep(delay);
 			} catch (InterruptedException e1) {
-				LOGGER.debug("Exception :",e1);
+				logger.debug("Exception :", e1);
 			}
-			LOGGER.debug("Sending callback response:" + callbackUrl);
+			logger.debug("Sending callback response:" + callbackUrl);
 			try {
 				HttpClient client = new HttpClientFactory().newTextXmlClient(
 					UriBuilder.fromUri(callbackUrl).build().toURL(),
 					TargetEntity.SDNC_ADAPTER);
 				client.post(payLoad);
 			} catch (Exception e) {
-				LOGGER.debug("Exception :",e);
+				logger.debug("Exception :", e);
 			}
 		}
 		
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java
index 832caae..344c3b5 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -25,7 +27,6 @@
 
 import org.onap.so.client.HttpClient;
 import org.onap.so.client.HttpClientFactory;
-import org.onap.so.logger.MsoLogger;
 import org.onap.so.utils.TargetEntity;
 
 import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
@@ -34,10 +35,12 @@
 import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer;
 import com.github.tomakehurst.wiremock.http.Request;
 import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class SDNCAdapterNetworkTopologyMockTransformer extends ResponseDefinitionTransformer {
 
-	private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SDNCAdapterNetworkTopologyMockTransformer.class);
+	private static final Logger logger = LoggerFactory.getLogger(SDNCAdapterNetworkTopologyMockTransformer.class);
 	
 	private String callbackResponse;
 	private String requestId;
@@ -61,22 +64,22 @@
 		
 		String callbackUrl = requestBody.substring(requestBody.indexOf("<sdncadapter:CallbackUrl>")+25, requestBody.indexOf("</sdncadapter:CallbackUrl>"));
 		String requestId = requestBody.substring(requestBody.indexOf("<sdncadapter:RequestId>")+23, requestBody.indexOf("</sdncadapter:RequestId>"));
-		System.out.println("request callbackUrl : " + callbackUrl);
-		System.out.println("request requestId : " + requestId);
-		
-		System.out.println("file path/name : " + responseDefinition.getBodyFileName());
+		logger.info("request callbackUrl : " + callbackUrl);
+		logger.info("request requestId : " + requestId);
+
+		logger.info("file path/name : " + responseDefinition.getBodyFileName());
 		callbackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());		
 		// extract Response responseRequestId
 		String responseRequestId = callbackResponse.substring(callbackResponse.indexOf("<RequestId>")+11, callbackResponse.indexOf("</RequestId>"));
-		System.out.println("response requestId: " + responseRequestId);		
-		System.out.println("callbackResponse (before): " + callbackResponse);
+		logger.info("response requestId: " + responseRequestId);
+		logger.info("callbackResponse (before): " + callbackResponse);
 		callbackResponse = callbackResponse.replace(responseRequestId, requestId);				
 		if (this.requestId != null) {
 			callbackResponse = callbackResponse.replace(this.requestId, requestId);
 		} else {
 			callbackResponse = callbackResponse.replace(responseRequestId, requestId);
 		}	
-		System.out.println("callbackResponse (after):" + callbackResponse);		
+		logger.info("callbackResponse (after):" + callbackResponse);
 
 		Object sdncDelay = MockResource.getMockProperties().get("sdnc_delay");
 		int delay = 300;
@@ -85,7 +88,7 @@
 		}
 		
 		//Kick off callback thread
-		System.out.println("(NetworkTopologyMockTransformer) callback Url:" + callbackUrl + ":delay:" + delay);
+		logger.info("(NetworkTopologyMockTransformer) callback Url:" + callbackUrl + ":delay:" + delay);
 		CallbackResponseThread calbackResponseThread = new CallbackResponseThread(callbackUrl,callbackResponse, delay);
 		calbackResponseThread.start();
 		
@@ -119,19 +122,18 @@
 				sleep(delay);
 			} catch (InterruptedException e1) {
 				// TODO Auto-generated catch block
-				LOGGER.debug("Exception :",e1);
+				logger.debug("Exception :", e1);
 			}
-			LOGGER.debug("Sending callback response to url: " + callbackUrl);
+			logger.debug("Sending callback response to url: {}", callbackUrl);
 			try {
-				HttpClient client = new HttpClientFactory().newTextXmlClient(
-					UriBuilder.fromUri(callbackUrl).build().toURL(),
-					TargetEntity.SDNC_ADAPTER);
+				HttpClient client = new HttpClientFactory()
+					.newTextXmlClient(UriBuilder.fromUri(callbackUrl).build().toURL(), TargetEntity.SDNC_ADAPTER);
 				Response response = client.post(payLoad);
-				LOGGER.debug("Successfully posted callback? Status: " + response.getStatus());
+				logger.debug("Successfully posted callback? Status: {}", response.getStatus());
 			} catch (Exception e) {
 				// TODO Auto-generated catch block
-			    LOGGER.debug("catch error in - request.post() ");
-				LOGGER.debug("Exception :",e);
+				logger.debug("catch error in - request.post() ");
+				logger.debug("Exception :", e);
 			}
 		}
 		
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterCreateMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterCreateMockTransformer.java
index 107a70d..362d950 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterCreateMockTransformer.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterCreateMockTransformer.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -25,7 +27,6 @@
 
 import org.onap.so.client.HttpClient;
 import org.onap.so.client.HttpClientFactory;
-import org.onap.so.logger.MsoLogger;
 import org.onap.so.utils.TargetEntity;
 
 import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
@@ -34,6 +35,8 @@
 import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer;
 import com.github.tomakehurst.wiremock.http.Request;
 import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Please describe the VnfAdapterCreateMockTransformer.java class
@@ -41,7 +44,7 @@
  */
 public class VnfAdapterCreateMockTransformer extends ResponseDefinitionTransformer {
 
-	private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterCreateMockTransformer.class);
+	private static final Logger logger = LoggerFactory.getLogger(VnfAdapterCreateMockTransformer.class);
 	
 	private String notifyCallbackResponse;
 	private String ackResponse;
@@ -74,17 +77,17 @@
 			responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
 		    updatedResponse = ackResponse.replace(responseMessageId, messageId);
 		} catch (Exception ex) {
-			LOGGER.debug("Exception :",ex);
+			logger.debug("Exception :",ex);
 			System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfCreateSimResponse.xml'");
 		    responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
 			updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
 		}
 
-		System.out.println("response (mock) messageId       : " + responseMessageId);
-		System.out.println("request  (replacement) messageId: " + messageId);
+		logger.info("response (mock) messageId       : {}", responseMessageId);
+		logger.info("request  (replacement) messageId: {}", messageId);
 
-		System.out.println("vnf Response (before):" + notifyCallbackResponse);
-		System.out.println("vnf Response (after):" + updatedResponse);
+		logger.info("vnf Response (before): {}", notifyCallbackResponse);
+		logger.info("vnf Response (after): {}", updatedResponse);
 
 		Object vnfDelay = MockResource.getMockProperties().get("vnf_delay");
 		int delay = 300;
@@ -93,7 +96,7 @@
 		}
 
 		//Kick off callback thread
-		System.out.println("VnfAdapterCreateMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay);
+		logger.info("VnfAdapterCreateMockTransformer notficationUrl: {} :delay: {}", notficationUrl, delay);
 		CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay);
 		callbackResponseThread.start();
 
@@ -128,20 +131,19 @@
 				sleep(delay);
 			} catch (InterruptedException e1) {
 				// TODO Auto-generated catch block
-				LOGGER.debug("Exception :",e1);
+				logger.debug("Exception :",e1);
 			}
-			LOGGER.debug("Sending callback response to url: " + callbackUrl);
+			logger.debug("Sending callback response to url: {}", callbackUrl);
 			try {
 				HttpClient client = new HttpClientFactory().newTextXmlClient(
 					UriBuilder.fromUri(callbackUrl).build().toURL(),
 					TargetEntity.VNF_ADAPTER);
 				Response response = client.post(payLoad);
-				LOGGER.debug("Successfully posted callback? Status: " + response.getStatus());
-				//System.err.println("Successfully posted callback:" + result.getStatus());
+				logger.debug("Successfully posted callback? Status: {}", response.getStatus());
 			} catch (Exception e) {
 				// TODO Auto-generated catch block
-			    LOGGER.debug("catch error in - request.post() ");
-				LOGGER.debug("Exception :",e);
+				logger.debug("catch error in - request.post() ");
+				logger.debug("Exception :", e);
 			}
 		}
 
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterDeleteMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterDeleteMockTransformer.java
index cf0f966..b67f3dc 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterDeleteMockTransformer.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterDeleteMockTransformer.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -24,7 +26,6 @@
 
 import org.onap.so.client.HttpClient;
 import org.onap.so.client.HttpClientFactory;
-import org.onap.so.logger.MsoLogger;
 import org.onap.so.utils.TargetEntity;
 
 import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
@@ -33,6 +34,8 @@
 import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer;
 import com.github.tomakehurst.wiremock.http.Request;
 import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Please describe the VnfAdapterCreateMockTransformer.java class
@@ -40,7 +43,7 @@
  */
 public class VnfAdapterDeleteMockTransformer extends ResponseDefinitionTransformer {
 
-	private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterDeleteMockTransformer.class);
+	private static final Logger logger = LoggerFactory.getLogger(VnfAdapterDeleteMockTransformer.class);
 
 	private String notifyCallbackResponse;
 	private String ackResponse;
@@ -58,8 +61,6 @@
 	public ResponseDefinition transform(Request request, ResponseDefinition responseDefinition,
 			FileSource fileSource, Parameters parameters) {
 
-		// System.err.println("notifyCallbackResponse:" + notifyCallbackResponse);
-
 		String requestBody = request.getBodyAsString();
 
 		String notficationUrl = requestBody.substring(requestBody.indexOf("<notificationUrl>")+17, requestBody.indexOf("</notificationUrl>"));
@@ -69,23 +70,23 @@
 
 		try {
 			// try supplied response file (if any)
-			System.out.println(" Supplied fileName: " + responseDefinition.getBodyFileName());
+			logger.info(" Supplied fileName: {}", responseDefinition.getBodyFileName());
 		    ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
 			notifyCallbackResponse = ackResponse;
 			responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
 		    updatedResponse = ackResponse.replace(responseMessageId, messageId);
 		} catch (Exception ex) {
-			LOGGER.debug("Exception :",ex);
-			System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfDeleteSimResponse.xml'");
+			logger.debug("Exception :",ex);
+			logger.info(" ******* Use default response file in '__files/vnfAdapterMocks/vnfDeleteSimResponse.xml'");
 		    responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
 			updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
 		}
 
-		System.out.println("response (mock) messageId       : " + responseMessageId);
-		System.out.println("request  (replacement) messageId: " + messageId);
+		logger.info("response (mock) messageId       : {}", responseMessageId);
+		logger.info("request  (replacement) messageId: {}", messageId);
 
-		System.out.println("vnf Response (before):" + notifyCallbackResponse);
-		System.out.println("vnf Response (after):" + updatedResponse);
+		logger.info("vnf Response (before):{}", notifyCallbackResponse);
+		logger.info("vnf Response (after):{}", updatedResponse);
 
 		Object vnfDelay = MockResource.getMockProperties().get("vnf_delay");
 		int delay = 300;
@@ -94,7 +95,7 @@
 		}
 
 		//Kick off callback thread
-		System.out.println("VnfAdapterDeleteMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay);
+		logger.info("VnfAdapterDeleteMockTransformer notficationUrl: {} :delay: {}", notficationUrl, delay);
 		CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay);
 		callbackResponseThread.start();
 
@@ -129,7 +130,7 @@
 				sleep(delay);
 			} catch (InterruptedException e1) {
 				// TODO Auto-generated catch block
-				LOGGER.debug("Exception :",e1);
+				logger.debug("Exception :",e1);
 			}
 
 			try {
@@ -139,8 +140,8 @@
 				client.post(payLoad);
 			} catch (Exception e) {
 				// TODO Auto-generated catch block
-				System.out.println("catch error in - request.post() ");
-				LOGGER.debug("Exception :",e);
+				logger.info("catch error in - request.post() ");
+				logger.debug("Exception :",e);
 			}
 		}
 
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterQueryMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterQueryMockTransformer.java
index 5eaa4e7..48ced35 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterQueryMockTransformer.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterQueryMockTransformer.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -25,7 +27,6 @@
 
 import org.onap.so.client.HttpClient;
 import org.onap.so.client.HttpClientFactory;
-import org.onap.so.logger.MsoLogger;
 import org.onap.so.utils.TargetEntity;
 
 import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
@@ -34,6 +35,8 @@
 import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer;
 import com.github.tomakehurst.wiremock.http.Request;
 import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Please describe the VnfAdapterQueryMockTransformer.java class
@@ -43,7 +46,8 @@
 
 public class VnfAdapterQueryMockTransformer extends ResponseDefinitionTransformer{
 	
-	private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterQueryMockTransformer.class);
+	private static final Logger logger = LoggerFactory.getLogger(VnfAdapterQueryMockTransformer
+		.class);
 	
 	private String notifyCallbackResponse;
 	private String ackResponse;
@@ -70,36 +74,29 @@
 
 		String notficationUrl = requestBody.substring(requestBody.indexOf("<notificationUrl>")+17, requestBody.indexOf("</notificationUrl>"));
 		String messageId = requestBody.substring(requestBody.indexOf("<messageId>")+11, requestBody.indexOf("</messageId>"));
-	//	String updatedResponse = notifyCallbackResponse.replace("b1a82ce6-7f5c-45fd-9273-acaf88fc2137", messageId);
-	
+
 		String responseMessageId = "";
 		String updatedResponse = "";
-		
-	//	if (ackResponse == null) {
-			//System.err.println("file:" + responseDefinition.getBodyFileName());
-		//	ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
-		//}
 
-		
 		try {
 			// try supplied response file (if any)
-			System.out.println(" Supplied fileName: " + responseDefinition.getBodyFileName());
+			logger.info(" Supplied fileName: {}", responseDefinition.getBodyFileName());
 		    ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
 			notifyCallbackResponse = ackResponse;
 			responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
 		    updatedResponse = ackResponse.replace(responseMessageId, messageId); 
 		} catch (Exception ex) {
-			LOGGER.debug("Exception :",ex);
-			System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfQuerySimResponse.xml'");
+			logger.debug("Exception :",ex);
+			logger.info(" ******* Use default response file in '__files/vnfAdapterMocks/vnfQuerySimResponse.xml'");
 		    responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
 			updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
 		}
-		
-		System.out.println("response (mock) messageId       : " + responseMessageId);		
-		System.out.println("request  (replacement) messageId: " + messageId);
-		
-		System.out.println("vnf Response (before):" + notifyCallbackResponse);
-		System.out.println("vnf Response (after):" + updatedResponse);
+
+		logger.info("response (mock) messageId       : {}", responseMessageId);
+		logger.info("request  (replacement) messageId: {}", messageId);
+
+		logger.info("vnf Response (before):{}", notifyCallbackResponse);
+		logger.info("vnf Response (after):{}", updatedResponse);
 		
 		
 		Object vnfDelay = MockResource.getMockProperties().get("vnf_delay");
@@ -109,12 +106,9 @@
 		}
 
 		//Kick off callback thread
-		
-		//System.out.println("notficationUrl" + notficationUrl);
-		//System.out.println("updatedResponse" + updatedResponse);
-		System.out.println("VnfAdapterQueryMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay);
+		logger.info("VnfAdapterQueryMockTransformer notficationUrl: {}:delay: {}", notficationUrl, delay);
 		CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay);
-		System.out.println("Inside Callback" );
+		logger.info("Inside Callback" );
 		callbackResponseThread.start();
 
 				return ResponseDefinitionBuilder
@@ -145,7 +139,7 @@
 				//Delay sending callback response
 				sleep(delay);
 			} catch (InterruptedException e1) {
-				LOGGER.debug("Exception :",e1);
+				logger.debug("Exception :",e1);
 			}
 
 			try {
@@ -154,7 +148,7 @@
 					TargetEntity.VNF_ADAPTER);
 				client.post(payLoad);
 			} catch (Exception e) {
-				LOGGER.debug("Exception :",e);
+				logger.debug("Exception :",e);
 			}
 		}
 
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterRollbackMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterRollbackMockTransformer.java
index 06f2fb7..edf0542 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterRollbackMockTransformer.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterRollbackMockTransformer.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -24,7 +26,6 @@
 
 import org.onap.so.client.HttpClient;
 import org.onap.so.client.HttpClientFactory;
-import org.onap.so.logger.MsoLogger;
 import org.onap.so.utils.TargetEntity;
 
 import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
@@ -33,6 +34,8 @@
 import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer;
 import com.github.tomakehurst.wiremock.http.Request;
 import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Please describe the VnfAdapterCreateMockTransformer.java class
@@ -40,7 +43,7 @@
  */
 public class VnfAdapterRollbackMockTransformer extends ResponseDefinitionTransformer {
 
-	private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterRollbackMockTransformer.class);
+	private static final Logger logger = LoggerFactory.getLogger(VnfAdapterRollbackMockTransformer.class);
 
 	private String notifyCallbackResponse;
 	private String ackResponse;
@@ -72,23 +75,23 @@
 		
 		try {
 			// try supplied response file (if any)
-			System.out.println(" Supplied fileName: " + responseDefinition.getBodyFileName());
+			logger.info(" Supplied fileName: {}", responseDefinition.getBodyFileName());
 		    ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
 			notifyCallbackResponse = ackResponse;
 			responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
 		    updatedResponse = ackResponse.replace(responseMessageId, messageId); 
 		} catch (Exception ex) {
-			LOGGER.debug("Exception :",ex);
-			System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfRollbackSimResponse.xml'");
+			logger.debug("Exception :",ex);
+			logger.info(" ******* Use default response file in '__files/vnfAdapterMocks/vnfRollbackSimResponse.xml'");
 		    responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
 			updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
 		}
-		
-		System.out.println("response (mock) messageId       : " + responseMessageId);		
-		System.out.println("request  (replacement) messageId: " + messageId);
-		
-		System.out.println("vnf Response (before):" + notifyCallbackResponse);
-		System.out.println("vnf Response (after):" + updatedResponse);
+
+		logger.info("response (mock) messageId       : {}", responseMessageId);
+		logger.info("request  (replacement) messageId: {}", messageId);
+
+		logger.info("vnf Response (before):{}", notifyCallbackResponse);
+		logger.info("vnf Response (after):{}", updatedResponse);
 
 		Object vnfDelay = MockResource.getMockProperties().get("vnf_delay");
 		int delay = 300;
@@ -97,7 +100,7 @@
 		}
 
 		//Kick off callback thread
-		System.out.println("VnfAdapterRollbackMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay);		
+		logger.info("VnfAdapterRollbackMockTransformer notficationUrl: {} :delay: {}", notficationUrl, delay);
 		CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay);
 		callbackResponseThread.start();
 
@@ -130,7 +133,7 @@
 				//Delay sending callback response
 				sleep(delay);
 			} catch (InterruptedException e1) {
-				LOGGER.debug("Exception :",e1);
+				logger.debug("Exception :",e1);
 			}
 
 			try {
@@ -139,8 +142,8 @@
 					TargetEntity.VNF_ADAPTER);
 				client.post(payLoad);
 			} catch (Exception e) {
-				System.out.println("catch error in - request.post() ");				
-				LOGGER.debug("Exception :",e);
+				logger.info("catch error in - request.post() ");
+				logger.debug("Exception :", e);
 			}
 		}
 
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterUpdateMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterUpdateMockTransformer.java
index 9e60e87..5693877 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterUpdateMockTransformer.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterUpdateMockTransformer.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -24,7 +26,6 @@
 
 import org.onap.so.client.HttpClient;
 import org.onap.so.client.HttpClientFactory;
-import org.onap.so.logger.MsoLogger;
 import org.onap.so.utils.TargetEntity;
 
 import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
@@ -33,6 +34,8 @@
 import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer;
 import com.github.tomakehurst.wiremock.http.Request;
 import com.github.tomakehurst.wiremock.http.ResponseDefinition;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Please describe the VnfAdapterUpdateMockTransformer.java class
@@ -40,7 +43,7 @@
  */
 public class VnfAdapterUpdateMockTransformer extends ResponseDefinitionTransformer {
 
-	private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterUpdateMockTransformer.class);
+	private static final Logger logger = LoggerFactory.getLogger(VnfAdapterUpdateMockTransformer.class);
 	
 	private String notifyCallbackResponse;
 	private String requestId;
@@ -72,23 +75,23 @@
 		
 		try {
 			// try supplied response file (if any)
-			System.out.println(" Supplied fileName: " + responseDefinition.getBodyFileName());
+			logger.info(" Supplied fileName: {}", responseDefinition.getBodyFileName());
 		    ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName());
 			notifyCallbackResponse = ackResponse;
 			responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>"));
 		    updatedResponse = ackResponse.replace(responseMessageId, messageId); 
 		} catch (Exception ex) {
-			LOGGER.debug("Exception :",ex);
-			System.out.println(" ******* Use default response file in 'vnfAdapter/vnfUpdateSimResponse.xml'");
+			logger.debug("Exception :",ex);
+			logger.info(" ******* Use default response file in 'vnfAdapter/vnfUpdateSimResponse.xml'");
 		    responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>"));
 			updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId);
 		}
-		
-		System.out.println("response (mock) messageId       : " + responseMessageId);		
-		System.out.println("request  (replacement) messageId: " + messageId);
-		
-		System.out.println("vnf Response (before):" + notifyCallbackResponse);
-		System.out.println("vnf Response (after):" + updatedResponse);
+
+		logger.info("response (mock) messageId       : {}", responseMessageId);
+		logger.info("request  (replacement) messageId: {}", messageId);
+
+		logger.info("vnf Response (before):{}", notifyCallbackResponse);
+		logger.info("vnf Response (after):{}", updatedResponse);
 		
 		Object vnfDelay = MockResource.getMockProperties().get("vnf_delay");
 		int delay = 300;
@@ -97,7 +100,7 @@
 		}
 
 		//Kick off callback thread
-		System.out.println("VnfAdapterUpdateMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay);		
+		logger.info("VnfAdapterUpdateMockTransformer notficationUrl: {} :delay: {}", notficationUrl, delay);
 		CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay);
 		callbackResponseThread.start();
 
@@ -130,7 +133,7 @@
 				//Delay sending callback response
 				sleep(delay);
 			} catch (InterruptedException e1) {
-				LOGGER.debug("Exception :", e1);
+				logger.debug("Exception :", e1);
 			}
 
 			try {
@@ -139,8 +142,8 @@
 					TargetEntity.VNF_ADAPTER);
 				client.post(payLoad);
 			} catch (Exception e) {
-				System.out.println("catch error in - request.post() ");
-				LOGGER.debug("Exception :",e);
+				logger.info("catch error in - request.post() ");
+				logger.debug("Exception :", e);
 			}
 		}
 
