diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/services/HealthCheckImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/services/HealthCheckImpl.java
index 5bdc034..b50913a 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/services/HealthCheckImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/services/HealthCheckImpl.java
@@ -29,10 +29,6 @@
 import org.openecomp.sdc.health.data.HealthInfo;
 import org.openecomp.sdc.logging.api.Logger;
 import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
-import org.openecomp.sdcrests.health.types.HealthInfoDtos;
-import org.openecomp.sdcrests.wrappers.GenericCollectionWrapper;
 import org.springframework.context.annotation.Scope;
 import org.springframework.stereotype.Service;
 
@@ -63,7 +59,6 @@
     SessionContextProviderFactory.getInstance().createInterface().create("public");
 
     try {
-      MdcUtil.initMdc(LoggerServiceName.Health_check.toString());
       Collection<HealthInfo> healthInfos = healthCheckManager.checkHealth();
       healthCheckResult.setComponentsInfo(healthInfos);
       boolean someIsDown = healthInfos.stream()
@@ -81,7 +76,6 @@
     } catch (Exception ex) {
       logger.error("Health check failed", ex);
       Response.ResponseBuilder responseBuilder = new ResponseBuilderImpl();
-      GenericCollectionWrapper<HealthInfoDtos> results = new GenericCollectionWrapper<>();
       HealthInfo healthInfo = new HealthInfo(org.openecomp.sdc.health.data.MonitoredModules.BE,
           HealthCheckStatus.DOWN,
           "", "Failed to perform Health Check");
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/VersionsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/VersionsImpl.java
index 23ffc25..c3497e8 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/VersionsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/item-rest/item-rest-services/src/main/java/org/openecomp/sdcrests/item/rest/services/VersionsImpl.java
@@ -32,8 +32,6 @@
 import org.openecomp.sdc.itempermissions.ItemPermissionsManagerFactory;
 import org.openecomp.sdc.logging.api.Logger;
 import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.notification.dtos.Event;
 import org.openecomp.sdc.notification.factories.NotificationPropagationManagerFactory;
 import org.openecomp.sdc.notification.services.NotificationPropagationManager;
@@ -131,8 +129,6 @@
 
   @Override
   public Response getActivityLog(String itemId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_List_Activity_Log.toString());
-
     GenericCollectionWrapper<ActivityLogDto> results = new GenericCollectionWrapper<>();
     MapActivityLogEntityToDto mapper = new MapActivityLogEntityToDto();
 
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-rest/notifications-rest-services/src/main/java/org/openecomp/sdcrests/notifications/rest/services/impl/NotificationsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-rest/notifications-rest-services/src/main/java/org/openecomp/sdcrests/notifications/rest/services/impl/NotificationsImpl.java
index 8ff0ac0..9f6455e 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-rest/notifications-rest-services/src/main/java/org/openecomp/sdcrests/notifications/rest/services/impl/NotificationsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/notifications-rest/notifications-rest-services/src/main/java/org/openecomp/sdcrests/notifications/rest/services/impl/NotificationsImpl.java
@@ -5,8 +5,6 @@
 import org.openecomp.sdc.datatypes.error.ErrorMessage;
 import org.openecomp.sdc.logging.api.Logger;
 import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.notification.dao.types.NotificationEntity;
 import org.openecomp.sdc.notification.dtos.NotificationsStatus;
 import org.openecomp.sdc.notification.exceptons.NotificationNotExistException;
@@ -43,7 +41,6 @@
 
     @Override
     public Response getNotifications(String user, UUID lastDelivered, UUID endOfPage) {
-        MdcUtil.initMdc(LoggerServiceName.notifications.toString());
         NotificationsStatus notificationsStatus = notificationsService
             .getNotificationsStatus(user, lastDelivered, selectionLimit, endOfPage);
         MapNotificationsStatusToDto converter = new MapNotificationsStatusToDto();
@@ -91,8 +88,6 @@
 
     @Override
     public Response getNewNotificationsByOwnerId(String user, String eventId, String limitStr) {
-        MdcUtil.initMdc(LoggerServiceName.notifications.toString());
-
         int limit = selectionLimit;
 
         if (Objects.nonNull(limitStr)) {
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolLimitsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolLimitsImpl.java
index 09a4ca8..780885a 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolLimitsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolLimitsImpl.java
@@ -1,8 +1,6 @@
 package org.openecomp.sdcrests.vendorlicense.rest.services;
 
 
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
 import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
 import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
@@ -30,7 +28,7 @@
   private VendorLicenseManager vendorLicenseManager =
       VendorLicenseManagerFactory.getInstance().createInterface();
 
-  public static final String parent = "EntitlementPool";
+  private static final String PARENT = "EntitlementPool";
 
   @Override
   public Response createLimit(LimitRequestDto request,
@@ -38,7 +36,6 @@
                               String versionId,
                               String entitlementPoolId,
                               String user) {
-    MdcUtil.initMdc(LoggerServiceName.Create_LIMIT.toString());
     Version version = new Version(versionId);
     vendorLicenseManager
         .getEntitlementPool(new EntitlementPoolEntity(vlmId, version, entitlementPoolId));
@@ -48,23 +45,18 @@
     limitEntity.setVendorLicenseModelId(vlmId);
     limitEntity.setVersion(version);
     limitEntity.setEpLkgId(entitlementPoolId);
-    limitEntity.setParent(parent);
+    limitEntity.setParent(PARENT);
 
     LimitEntity createdLimit = vendorLicenseManager.createLimit(limitEntity);
     MapLimitEntityToLimitCreationDto mapper = new MapLimitEntityToLimitCreationDto();
     LimitCreationDto createdLimitDto = mapper.applyMapping(createdLimit, LimitCreationDto.class);
 
-    /*StringWrapperResponse result =
-        createdLimit != null ? new StringWrapperResponse(createdLimit.getId())
-            : null;*/
-    //return Response.ok(result).build();
     return Response.ok(createdLimitDto != null ? createdLimitDto : null).build();
   }
 
   @Override
   public Response listLimits(String vlmId, String versionId, String entitlementPoolId, String
       user) {
-    MdcUtil.initMdc(LoggerServiceName.List_EP.toString());
     Version version = new Version(versionId);
     vendorLicenseManager
         .getEntitlementPool(new EntitlementPoolEntity(vlmId, version, entitlementPoolId));
@@ -84,8 +76,6 @@
   @Override
   public Response getLimit(String vlmId, String versionId, String entitlementPoolId,
                            String limitId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_LIMIT.toString());
-
     Version version = new Version(versionId);
     vendorLicenseManager
         .getEntitlementPool(new EntitlementPoolEntity(vlmId, version, entitlementPoolId));
@@ -108,8 +98,6 @@
                               String entitlementPoolId,
                               String limitId,
                               String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_LIMIT.toString());
-
     Version version = new Version(versionId);
     vendorLicenseManager
         .getEntitlementPool(new EntitlementPoolEntity(vlmId, version, entitlementPoolId));
@@ -120,7 +108,7 @@
     limitEntity.setVersion(version);
     limitEntity.setEpLkgId(entitlementPoolId);
     limitEntity.setId(limitId);
-    limitEntity.setParent(parent);
+    limitEntity.setParent(PARENT);
 
     vendorLicenseManager.updateLimit(limitEntity);
     return Response.ok().build();
@@ -137,8 +125,6 @@
    */
   public Response deleteLimit(String vlmId, String versionId, String entitlementPoolId,
                               String limitId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_LIMIT.toString());
-
     Version version = new Version(versionId);
     vendorLicenseManager.getEntitlementPool(
         new EntitlementPoolEntity(vlmId, version, entitlementPoolId));
@@ -148,7 +134,7 @@
     limitInput.setVersion(version);
     limitInput.setEpLkgId(entitlementPoolId);
     limitInput.setId(limitId);
-    limitInput.setParent(parent);
+    limitInput.setParent(PARENT);
 
     vendorLicenseManager.deleteLimit(limitInput);
     return Response.ok().build();
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java
index 07151d2..076ae45 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java
@@ -20,8 +20,6 @@
 
 package org.openecomp.sdcrests.vendorlicense.rest.services;
 
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
 import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
 import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
@@ -56,7 +54,6 @@
    * @return the response
    */
   public Response listEntitlementPools(String vlmId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.List_EP.toString());
     Collection<EntitlementPoolEntity> entitlementPools =
         vendorLicenseManager.listEntitlementPools(vlmId, new Version(versionId));
 
@@ -79,7 +76,6 @@
    */
   public Response createEntitlementPool(EntitlementPoolRequestDto request, String vlmId,
                                         String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Create_EP.toString());
     EntitlementPoolEntity entitlementPoolEntity =
         new MapEntitlementPoolRequestDtoToEntitlementPoolEntity()
             .applyMapping(request, EntitlementPoolEntity.class);
@@ -105,7 +101,6 @@
    */
   public Response updateEntitlementPool(EntitlementPoolRequestDto request, String vlmId,
                                         String versionId, String entitlementPoolId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_EP.toString());
     EntitlementPoolEntity entitlementPoolEntity =
         new MapEntitlementPoolRequestDtoToEntitlementPoolEntity()
             .applyMapping(request, EntitlementPoolEntity.class);
@@ -128,7 +123,6 @@
    */
   public Response getEntitlementPool(String vlmId, String versionId, String entitlementPoolId,
                                      String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_EP.toString());
     EntitlementPoolEntity epInput = new EntitlementPoolEntity();
     epInput.setVendorLicenseModelId(vlmId);
     epInput.setVersion(new Version(versionId));
@@ -151,7 +145,6 @@
    */
   public Response deleteEntitlementPool(String vlmId, String versionId, String entitlementPoolId,
                                         String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_EP.toString());
     EntitlementPoolEntity epInput = new EntitlementPoolEntity();
     epInput.setVendorLicenseModelId(vlmId);
     epInput.setId(entitlementPoolId);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java
index 77aeac8..cd11a45 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java
@@ -21,8 +21,6 @@
 package org.openecomp.sdcrests.vendorlicense.rest.services;
 
 import org.openecomp.core.utilities.CommonMethods;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
 import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
 import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
@@ -60,7 +58,6 @@
 
   @Override
   public Response listFeatureGroups(String vlmId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.List_FG.toString());
     Collection<FeatureGroupEntity> featureGroupEntities =
         vendorLicenseManager.listFeatureGroups(vlmId, new Version(versionId));
 
@@ -84,7 +81,6 @@
   @Override
   public Response createFeatureGroup(FeatureGroupRequestDto request, String vlmId, String versionId,
                                      String user) {
-    MdcUtil.initMdc(LoggerServiceName.Create_FG.toString());
     FeatureGroupEntity featureGroupEntity = new MapFeatureGroupDescriptorDtoToFeatureGroupEntity()
         .applyMapping(request, FeatureGroupEntity.class);
     featureGroupEntity.setVendorLicenseModelId(vlmId);
@@ -103,7 +99,6 @@
   @Override
   public Response updateFeatureGroup(FeatureGroupUpdateRequestDto request, String vlmId,
                                      String versionId, String featureGroupId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_FG.toString());
     FeatureGroupEntity featureGroupEntity = new MapFeatureGroupDescriptorDtoToFeatureGroupEntity()
         .applyMapping(request, FeatureGroupEntity.class);
     featureGroupEntity.setVendorLicenseModelId(vlmId);
@@ -120,7 +115,6 @@
   @Override
   public Response getFeatureGroup(String vlmId, String versionId, String featureGroupId,
                                   String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_FG.toString());
     FeatureGroupEntity fgInput = new FeatureGroupEntity();
     fgInput.setVendorLicenseModelId(vlmId);
     fgInput.setVersion(new Version(versionId));
@@ -165,7 +159,6 @@
   @Override
   public Response deleteFeatureGroup(String vlmId, String versionId, String featureGroupId,
                                      String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_FG.toString());
     FeatureGroupEntity fgInput = new FeatureGroupEntity();
     fgInput.setVendorLicenseModelId(vlmId);
     fgInput.setVersion(new Version(versionId));
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseAgreementsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseAgreementsImpl.java
index 5be30d8..f41d0a2 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseAgreementsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseAgreementsImpl.java
@@ -21,8 +21,6 @@
 package org.openecomp.sdcrests.vendorlicense.rest.services;
 
 import org.openecomp.core.utilities.CommonMethods;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
 import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
 import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
@@ -64,7 +62,6 @@
    * @return the response
    */
   public Response listLicenseAgreements(String vlmId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.List_LA.toString());
     Collection<LicenseAgreementEntity> licenseAgreements =
         vendorLicenseManager.listLicenseAgreements(vlmId, new Version(versionId));
 
@@ -91,7 +88,6 @@
    */
   public Response createLicenseAgreement(LicenseAgreementRequestDto request, String vlmId,
                                          String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Create_LA.toString());
     LicenseAgreementEntity licenseAgreementEntity =
         new MapLicenseAgreementDescriptorDtoToLicenseAgreementEntity()
             .applyMapping(request, LicenseAgreementEntity.class);
@@ -118,7 +114,6 @@
    */
   public Response updateLicenseAgreement(LicenseAgreementUpdateRequestDto request, String vlmId,
                                          String versionId, String licenseAgreementId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_LA.toString());
     LicenseAgreementEntity licenseAgreementEntity =
         new MapLicenseAgreementDescriptorDtoToLicenseAgreementEntity()
             .applyMapping(request, LicenseAgreementEntity.class);
@@ -143,7 +138,6 @@
    */
   public Response getLicenseAgreement(String vlmId, String versionId, String licenseAgreementId,
                                       String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_LA.toString());
     LicenseAgreementModel licenseAgreementModel = vendorLicenseManager
         .getLicenseAgreementModel(vlmId, new Version(versionId), licenseAgreementId);
 
@@ -185,7 +179,6 @@
    */
   public Response deleteLicenseAgreement(String vlmId, String versionId, String licenseAgreementId,
                                          String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_LA.toString());
     vendorLicenseManager.deleteLicenseAgreement(vlmId, new Version(versionId), licenseAgreementId);
     return Response.ok().build();
   }
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupLimitsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupLimitsImpl.java
index 164ea28..9386861 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupLimitsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupLimitsImpl.java
@@ -1,7 +1,5 @@
 package org.openecomp.sdcrests.vendorlicense.rest.services;
 
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
 import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
 import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
@@ -29,7 +27,7 @@
   private VendorLicenseManager vendorLicenseManager =
       VendorLicenseManagerFactory.getInstance().createInterface();
 
-  public static final String parent = "LicenseKeyGroup";
+  private static final String PARENT = "LicenseKeyGroup";
 
 
   @Override
@@ -38,7 +36,6 @@
                               String versionId,
                               String licenseKeyGroupId,
                               String user) {
-    MdcUtil.initMdc(LoggerServiceName.Create_LIMIT.toString());
     Version version = new Version(versionId);
     vendorLicenseManager.getLicenseKeyGroup(
         new LicenseKeyGroupEntity(vlmId, version, licenseKeyGroupId));
@@ -48,22 +45,17 @@
     limitEntity.setVendorLicenseModelId(vlmId);
     limitEntity.setVersion(version);
     limitEntity.setEpLkgId(licenseKeyGroupId);
-    limitEntity.setParent(parent);
+    limitEntity.setParent(PARENT);
 
     LimitEntity createdLimit = vendorLicenseManager.createLimit(limitEntity);
     MapLimitEntityToLimitCreationDto mapper = new MapLimitEntityToLimitCreationDto();
     LimitCreationDto createdLimitDto = mapper.applyMapping(createdLimit, LimitCreationDto.class);
-    /*StringWrapperResponse result =
-        createdLimit != null ? new StringWrapperResponse(createdLimit.getId())
-            : null;*/
-    //return Response.ok(result).build();
     return Response.ok(createdLimitDto != null ? createdLimitDto : null).build();
   }
 
   @Override
   public Response listLimits(String vlmId, String versionId, String licenseKeyGroupId,
                              String user) {
-    MdcUtil.initMdc(LoggerServiceName.List_EP.toString());
     Version version = new Version(versionId);
     vendorLicenseManager
         .getLicenseKeyGroup(new LicenseKeyGroupEntity(vlmId, version, licenseKeyGroupId));
@@ -87,8 +79,6 @@
                               String licenseKeyGroupId,
                               String limitId,
                               String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_LIMIT.toString());
-
     Version version = new Version(versionId);
     vendorLicenseManager
         .getLicenseKeyGroup(new LicenseKeyGroupEntity(vlmId, version, licenseKeyGroupId));
@@ -99,7 +89,7 @@
     limitEntity.setVersion(version);
     limitEntity.setEpLkgId(licenseKeyGroupId);
     limitEntity.setId(limitId);
-    limitEntity.setParent(parent);
+    limitEntity.setParent(PARENT);
 
     vendorLicenseManager.updateLimit(limitEntity);
     return Response.ok().build();
@@ -116,8 +106,6 @@
    */
   public Response deleteLimit(String vlmId, String versionId, String licenseKeyGroupId,
                               String limitId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_LIMIT.toString());
-
     Version version = new Version(versionId);
     vendorLicenseManager
         .getLicenseKeyGroup(new LicenseKeyGroupEntity(vlmId, version, licenseKeyGroupId));
@@ -127,7 +115,7 @@
     limitInput.setVersion(version);
     limitInput.setEpLkgId(licenseKeyGroupId);
     limitInput.setId(limitId);
-    limitInput.setParent(parent);
+    limitInput.setParent(PARENT);
 
     vendorLicenseManager.deleteLimit(limitInput);
     return Response.ok().build();
@@ -136,7 +124,6 @@
   @Override
   public Response getLimit(String vlmId, String versionId, String licenseKeyGroupId,
                            String limitId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_LIMIT.toString());
     Version version = new Version(versionId);
     vendorLicenseManager
         .getLicenseKeyGroup(new LicenseKeyGroupEntity(vlmId, version, licenseKeyGroupId));
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupsImpl.java
index 4c24d59..5f37d39 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupsImpl.java
@@ -20,8 +20,6 @@
 
 package org.openecomp.sdcrests.vendorlicense.rest.services;
 
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
 import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
 import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
@@ -58,7 +56,6 @@
    * @return the response
    */
   public Response listLicenseKeyGroups(String vlmId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.List_LKG.toString());
     Collection<LicenseKeyGroupEntity> licenseKeyGroups =
         vendorLicenseManager.listLicenseKeyGroups(vlmId, new Version(versionId));
 
@@ -81,7 +78,6 @@
    */
   public Response createLicenseKeyGroup(LicenseKeyGroupRequestDto request, String vlmId,
                                         String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Create_LKG.toString());
     LicenseKeyGroupEntity licenseKeyGroupEntity =
         new MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity()
             .applyMapping(request, LicenseKeyGroupEntity.class);
@@ -108,7 +104,6 @@
   public Response updateLicenseKeyGroup(LicenseKeyGroupRequestDto request, String vlmId,
                                         String versionId,
                                         String licenseKeyGroupId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_LKG.toString());
     LicenseKeyGroupEntity licenseKeyGroupEntity =
         new MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity()
             .applyMapping(request, LicenseKeyGroupEntity.class);
@@ -131,7 +126,6 @@
    */
   public Response getLicenseKeyGroup(String vlmId, String versionId, String licenseKeyGroupId,
                                      String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_LKG.toString());
     LicenseKeyGroupEntity lkgInput = new LicenseKeyGroupEntity();
     lkgInput.setVendorLicenseModelId(vlmId);
     lkgInput.setVersion(new Version(versionId));
@@ -154,7 +148,6 @@
    */
   public Response deleteLicenseKeyGroup(String vlmId, String versionId, String licenseKeyGroupId,
                                         String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_LKG.toString());
     LicenseKeyGroupEntity lkgInput = new LicenseKeyGroupEntity();
     lkgInput.setVendorLicenseModelId(vlmId);
     lkgInput.setVersion(new Version(versionId));
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java
index 85c0b27..68b387e 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java
@@ -33,9 +33,6 @@
 import org.openecomp.sdc.itempermissions.impl.types.PermissionTypes;
 import org.openecomp.sdc.logging.api.Logger;
 import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.messages.AuditMessages;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.notification.dtos.Event;
 import org.openecomp.sdc.notification.factories.NotificationPropagationManagerFactory;
 import org.openecomp.sdc.notification.services.NotificationPropagationManager;
@@ -88,7 +85,6 @@
 @Validated
 public class VendorLicenseModelsImpl implements VendorLicenseModels {
 
-  private static final String VLM_ID = "VLM id";
   private static final String SUBMIT_ITEM_ACTION = "Submit_Item";
   private static final String SUBMIT_HEALED_VERSION_ERROR =
       "VLM Id %s: Error while submitting version %s created based on Certified version %s for healing purpose.";
@@ -108,8 +104,6 @@
 
   @Override
   public Response listLicenseModels(String versionStatus, String user) {
-    MdcUtil.initMdc(LoggerServiceName.List_VLM.toString());
-
     Predicate<Item> itemPredicate;
     if (VersionStatus.Certified.name().equals(versionStatus)) {
       itemPredicate = item -> ItemType.vlm.name().equals(item.getType()) &&
@@ -134,8 +128,6 @@
 
   @Override
   public Response createLicenseModel(VendorLicenseModelRequestDto request, String user) {
-    LOGGER.audit(AuditMessages.AUDIT_MSG + AuditMessages.CREATE_VLM + request.getVendorName());
-    MdcUtil.initMdc(LoggerServiceName.Create_VLM.toString());
 
     Item item = new Item();
     item.setType(ItemType.vlm.name());
@@ -171,8 +163,6 @@
   @Override
   public Response updateLicenseModel(VendorLicenseModelRequestDto request, String vlmId,
                                      String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_VLM.toString());
-
     VendorLicenseModelEntity vlm =
         new MapVendorLicenseModelRequestDtoToVendorLicenseModelEntity()
             .applyMapping(request, VendorLicenseModelEntity.class);
@@ -185,8 +175,6 @@
 
   @Override
   public Response getLicenseModel(String vlmId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_VLM.toString());
-
     Version version = versioningManager.get(vlmId, new Version(versionId));
     VendorLicenseModelEntity vlm = vendorLicenseManager.getVendorLicenseModel(vlmId, version);
     vlm.setWritetimeMicroSeconds(version.getModificationTime().getTime());
@@ -214,7 +202,6 @@
 
   @Override
   public Response deleteLicenseModel(String vlmId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_VLM.toString());
     vendorLicenseManager.deleteVendorLicenseModel(vlmId, new Version(versionId));
     return Response.ok().build();
   }
@@ -240,8 +227,6 @@
   }
 
   private void submit(String vlmId, Version version, String message, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Submit_VLM.toString());
-    LOGGER.audit(AuditMessages.AUDIT_MSG + AuditMessages.SUBMIT_VLM + vlmId);
 
     vendorLicenseManager.validate(vlmId, version);
     versioningManager.submit(vlmId, version, message);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentDependenciesImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentDependenciesImpl.java
index eab5e3e..f57e9bb 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentDependenciesImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentDependenciesImpl.java
@@ -16,8 +16,6 @@
 
 package org.openecomp.sdcrests.vsp.rest.services;
 
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.vendorsoftwareproduct.ComponentDependencyModelManager;
 import org.openecomp.sdc.vendorsoftwareproduct.ComponentDependencyModelManagerFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentDependencyModelEntity;
@@ -48,8 +46,6 @@
   @Override
   public Response create(ComponentDependencyModel request, String vspId, String versionId,
                          String user) {
-    MdcUtil.initMdc(LoggerServiceName.CREATE_COMPONENT_DEPENDENCY_MODEL.toString());
-
     final Version version = new Version(versionId);
 
     ComponentDependencyModelEntity modelEntity =
@@ -72,7 +68,7 @@
 
   @Override
   public Response list(String vspId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.GET_LIST_COMPONENT_DEPENDENCY.toString());
+
     Version vspVersion = new Version(versionId);
 
     Collection<ComponentDependencyModelEntity> componentDependencies =
@@ -90,7 +86,7 @@
 
   @Override
   public Response delete(String vspId, String versionId, String dependencyId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.DELETE_COMPONENT_DEPENDENCY.toString());
+
     Version vspVersion = new Version(versionId);
     componentDependencyModelManager.delete(vspId, vspVersion, dependencyId);
     return Response.ok().build();
@@ -100,8 +96,6 @@
   public Response update(ComponentDependencyModel request, String vspId, String versionId, String
       dependencyId, String user) {
 
-    MdcUtil.initMdc(LoggerServiceName.UPDATE_COMPONENT_DEPENDENCY.toString());
-
     final Version version = new Version(versionId);
     ComponentDependencyModelEntity modelEntity =
         new MapComponentDependencyModelRequestToEntity().applyMapping(request,
@@ -116,7 +110,7 @@
 
   @Override
   public Response get(String vspId, String version, String dependencyId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.GET_COMPONENT_DEPENDENCY.toString());
+
     ComponentDependencyModelEntity componentDependencyModelEntity = componentDependencyModelManager
         .get(vspId, new Version(version), dependencyId);
 
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentMonitoringUploadsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentMonitoringUploadsImpl.java
index 6e7f9cd..247f06f 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentMonitoringUploadsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentMonitoringUploadsImpl.java
@@ -4,11 +4,6 @@
 import org.openecomp.core.enrichment.types.MonitoringUploadType;
 import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
 import org.openecomp.sdc.common.errors.Messages;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.messages.AuditMessages;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.vendorsoftwareproduct.ComponentManager;
 import org.openecomp.sdc.vendorsoftwareproduct.ComponentManagerFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.MonitoringUploadsManager;
@@ -39,16 +34,11 @@
       monitoringUploadsManager = MonitoringUploadsManagerFactory.getInstance().createInterface();
   private ComponentManager componentManager =
       ComponentManagerFactory.getInstance().createInterface();
-  private static final Logger logger =
-      LoggerFactory.getLogger(ComponentMonitoringUploadsImpl.class);
 
   @Override
   public Response upload(Attachment attachment,
                          String vspId, String versionId, String componentId, String type,
                          String user) throws Exception {
-    MdcUtil.initMdc(LoggerServiceName.Upload_Monitoring_Artifact.toString());
-    logger.audit(AuditMessages.AUDIT_MSG + String.format(AuditMessages
-        .UPLOAD_MONITORING_FILE, type, vspId, componentId));
 
     Version version = new Version(versionId);
     componentManager.validateComponentExistence(vspId, version, componentId);
@@ -77,7 +67,6 @@
   @Override
   public Response delete(String vspId, String versionId, String componentId,
                          String type, String user) throws Exception {
-    MdcUtil.initMdc(LoggerServiceName.Delete_Monitoring_Artifact.toString());
 
     MonitoringUploadType monitoringUploadType = getMonitoringUploadType(vspId, componentId, type);
 
@@ -90,7 +79,6 @@
   @Override
   public Response list(String vspId, String versionId, String componentId,
                        String user) {
-    MdcUtil.initMdc(LoggerServiceName.List_Monitoring_Artifacts.toString());
 
     Version version = new Version(versionId);
     componentManager.validateComponentExistence(vspId, version, componentId);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentProcessesImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentProcessesImpl.java
index bad6f16..208bacb 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentProcessesImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentProcessesImpl.java
@@ -25,11 +25,6 @@
 import org.openecomp.sdc.activitylog.ActivityLogManagerFactory;
 import org.openecomp.sdc.activitylog.dao.type.ActivityLogEntity;
 import org.openecomp.sdc.activitylog.dao.type.ActivityType;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.messages.AuditMessages;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.vendorsoftwareproduct.ComponentManager;
 import org.openecomp.sdc.vendorsoftwareproduct.ComponentManagerFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.ProcessManager;
@@ -63,12 +58,9 @@
   private ActivityLogManager activityLogManager =
       ActivityLogManagerFactory.getInstance().createInterface();
 
-  private static final Logger logger =
-      LoggerFactory.getLogger(ComponentProcessesImpl.class);
-
   @Override
   public Response list(String vspId, String versionId, String componentId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.List_Component_Processes.toString());
+
     Version version = new Version(versionId);
     validateComponentExistence(vspId, version, componentId, user);
     Collection<ProcessEntity> processes = processManager.listProcesses(vspId, version, componentId);
@@ -84,7 +76,7 @@
 
   @Override
   public Response deleteList(String vspId, String versionId, String componentId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_List_Component_Processes.toString());
+
     Version version = new Version(versionId);
     validateComponentExistence(vspId, version, componentId, user);
     processManager.deleteProcesses(vspId, version, componentId);
@@ -95,7 +87,7 @@
   @Override
   public Response create(ProcessRequestDto request, String vspId, String versionId,
                          String componentId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Create_Component_Processes.toString());
+
     ProcessEntity process =
         new MapProcessRequestDtoToProcessEntity().applyMapping(request, ProcessEntity.class);
     process.setVspId(vspId);
@@ -113,7 +105,7 @@
   @Override
   public Response get(String vspId, String versionId, String componentId, String processId,
                       String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_Component_Processes.toString());
+
     Version version = new Version(versionId);
     validateComponentExistence(vspId, version, componentId, user);
     ProcessEntity process = processManager.getProcess(vspId, version, componentId, processId);
@@ -125,7 +117,7 @@
   @Override
   public Response delete(String vspId, String versionId, String componentId, String processId,
                          String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_Component_Processes.toString());
+
     Version version = new Version(versionId);
     validateComponentExistence(vspId, version, componentId, user);
     processManager.deleteProcess(vspId, version, componentId, processId);
@@ -136,7 +128,7 @@
   public Response update(ProcessRequestDto request, String vspId, String versionId,
                          String componentId,
                          String processId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_Component_Processes.toString());
+
     ProcessEntity process =
         new MapProcessRequestDtoToProcessEntity().applyMapping(request, ProcessEntity.class);
     process.setVspId(vspId);
@@ -151,7 +143,7 @@
   @Override
   public Response getUploadedFile(String vspId, String versionId, String componentId,
                                   String processId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_Uploaded_File_Component_Processes.toString());
+
     Version vspVersion = new Version(versionId);
     validateComponentExistence(vspId, vspVersion, componentId, user);
     File file = processManager.getProcessArtifact(vspId, vspVersion, componentId, processId);
@@ -168,7 +160,7 @@
   public Response deleteUploadedFile(String vspId, String versionId, String componentId,
                                      String processId,
                                      String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_Uploaded_File_Component_Processes.toString());
+
     Version version = new Version(versionId);
     validateComponentExistence(vspId, version, componentId, user);
     processManager.deleteProcessArtifact(vspId, version, componentId, processId);
@@ -179,8 +171,7 @@
   public Response uploadFile(Attachment attachment, String vspId, String versionId,
                              String componentId,
                              String processId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Upload_File_Component_Processes.toString());
-    logger.audit(AuditMessages.AUDIT_MSG + AuditMessages.UPLOAD_PROCESS_ARTIFACT + vspId);
+
     Version version = new Version(versionId);
     validateComponentExistence(vspId, version, componentId, user);
     processManager.uploadProcessArtifact(attachment.getObject(InputStream.class),
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentsImpl.java
index de422ec..abb87e4 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComponentsImpl.java
@@ -21,8 +21,6 @@
 package org.openecomp.sdcrests.vsp.rest.services;
 
 import org.apache.commons.collections4.CollectionUtils;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.vendorsoftwareproduct.ComponentManager;
 import org.openecomp.sdc.vendorsoftwareproduct.ComponentManagerFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
@@ -62,7 +60,7 @@
 
   @Override
   public Response list(String vspId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.List_Components.toString());
+
     Collection<ComponentEntity> components =
         componentManager.listComponents(vspId, new Version(versionId));
 
@@ -77,14 +75,13 @@
 
   @Override
   public Response deleteList(String vspId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_List_Components.toString());
     componentManager.deleteComponents(vspId, new Version(versionId));
     return Response.ok().build();
   }
 
   @Override
   public Response create(ComponentRequestDto request, String vspId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Create_Component.toString());
+
     ComponentEntity component =
         new MapComponentRequestDtoToComponentEntity().applyMapping(request, ComponentEntity.class);
     component.setVspId(vspId);
@@ -102,7 +99,7 @@
 
   @Override
   public Response get(String vspId, String versionId, String componentId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_Component.toString());
+
     CompositionEntityResponse<ComponentData> response =
         componentManager.getComponent(vspId, new Version(versionId), componentId);
 
@@ -114,7 +111,6 @@
 
   @Override
   public Response delete(String vspId, String versionId, String componentId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_Component.toString());
     componentManager.deleteComponent(vspId, new Version(versionId), componentId);
     return Response.ok().build();
   }
@@ -123,7 +119,6 @@
   public Response update(ComponentRequestDto request, String vspId, String versionId,
                          String componentId,
                          String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_Component.toString());
     ComponentEntity componentEntity =
         new MapComponentRequestDtoToComponentEntity().applyMapping(request, ComponentEntity.class);
     componentEntity.setVspId(vspId);
@@ -141,7 +136,6 @@
   @Override
   public Response getQuestionnaire(String vspId, String versionId, String componentId,
                                    String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_Questionnaire_Component.toString());
     QuestionnaireResponse questionnaireResponse =
         componentManager.getQuestionnaire(vspId, new Version(versionId), componentId);
 
@@ -153,7 +147,6 @@
   @Override
   public Response updateQuestionnaire(String questionnaireData, String vspId, String versionId,
                                       String componentId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_Questionnaire_Component.toString());
     componentManager
         .updateQuestionnaire(vspId, new Version(versionId), componentId, questionnaireData);
     return Response.ok().build();
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComputeImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComputeImpl.java
index 081024a..f655dfb 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComputeImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ComputeImpl.java
@@ -1,8 +1,6 @@
 package org.openecomp.sdcrests.vsp.rest.services;
 
 import org.apache.commons.collections4.CollectionUtils;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.vendorsoftwareproduct.ComponentManager;
 import org.openecomp.sdc.vendorsoftwareproduct.ComponentManagerFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.ComputeManager;
@@ -47,7 +45,7 @@
 
   @Override
   public Response list(String vspId, String versionId, String componentId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.List_Computes.toString());
+
     Version version = new Version(versionId);
     componentManager.validateComponentExistence(vspId, version, componentId);
     Collection<ListComputeResponse> computes =
@@ -65,7 +63,7 @@
   @Override
   public Response get(String vspId, String versionId, String componentId, String computeId,
                       String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_Compute.toString());
+
     Version version = new Version(versionId);
     componentManager.validateComponentExistence(vspId, version, componentId);
     CompositionEntityResponse<ComputeData> response =
@@ -81,7 +79,7 @@
   @Override
   public Response create(ComputeDetailsDto request, String vspId, String versionId,
                          String componentId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Create_Compute.toString());
+
     ComputeEntity compute = new MapComputeDetailsDtoToComputeEntity().applyMapping(request,
         ComputeEntity.class);
     compute.setVspId(vspId);
@@ -100,7 +98,7 @@
   @Override
   public Response update(ComputeDetailsDto request, String vspId, String versionId,
                          String componentId, String computeFlavorId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_Compute.toString());
+
     ComputeEntity compute =
         new MapComputeDetailsDtoToComputeEntity().applyMapping(request, ComputeEntity.class);
     compute.setVspId(vspId);
@@ -119,7 +117,7 @@
   @Override
   public Response delete(String vspId, String versionId, String componentId, String computeFlavorId,
                          String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_Compute.toString());
+
     Version version = new Version(versionId);
     componentManager.validateComponentExistence(vspId, version, componentId);
     computetManager.deleteCompute(vspId, version, componentId, computeFlavorId);
@@ -129,7 +127,7 @@
   @Override
   public Response getQuestionnaire(String vspId, String versionId, String componentId,
                                    String computeFlavorId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_Questionnaire_Compute.toString());
+
     Version version = new Version(versionId);
     componentManager.validateComponentExistence(vspId, version, componentId);
     QuestionnaireResponse questionnaireResponse =
@@ -143,7 +141,7 @@
   @Override
   public Response updateQuestionnaire(String questionnaireData, String vspId, String versionId,
                                       String componentId, String computeFlavorId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_Questionnaire_Compute.toString());
+
     Version version = new Version(versionId);
     componentManager.validateComponentExistence(vspId, version, componentId);
     computetManager.updateComputeQuestionnaire(vspId, version, componentId, computeFlavorId,
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/DeploymentFlavorsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/DeploymentFlavorsImpl.java
index d1486b6..dc16102 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/DeploymentFlavorsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/DeploymentFlavorsImpl.java
@@ -1,8 +1,6 @@
 package org.openecomp.sdcrests.vsp.rest.services;
 
 import org.apache.commons.collections4.CollectionUtils;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.vendorsoftwareproduct.DeploymentFlavorManager;
 import org.openecomp.sdc.vendorsoftwareproduct.DeploymentFlavorManagerFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.DeploymentFlavorEntity;
@@ -41,7 +39,6 @@
   @Override
   public Response create(DeploymentFlavorRequestDto request, String vspId, String versionId,
                          String user) {
-    MdcUtil.initMdc(LoggerServiceName.Create_Deployment_Flavor.toString());
     DeploymentFlavorEntity deploymentFlavorEntity =
         new MapDeploymentFlavorRequestDtoToDeploymentFlavorEntity()
             .applyMapping(request, DeploymentFlavorEntity.class);
@@ -60,7 +57,6 @@
 
   @Override
   public Response list(String vspId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_List_Deployment_flavor.toString());
     Collection<DeploymentFlavorEntity> deploymentFlavors =
         deploymentFlavorManager.listDeploymentFlavors(vspId, new Version(versionId));
 
@@ -76,7 +72,6 @@
 
   @Override
   public Response get(String vspId, String versionId, String deploymentFlavorId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_Deployment_flavor.toString());
     CompositionEntityResponse<DeploymentFlavor> response = deploymentFlavorManager
         .getDeploymentFlavor(vspId, new Version(versionId), deploymentFlavorId);
 
@@ -90,7 +85,6 @@
 
   @Override
   public Response getSchema(String vspId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_Deployment_flavor.toString());
     CompositionEntityResponse<DeploymentFlavor> response = deploymentFlavorManager
         .getDeploymentFlavorSchema(vspId, new Version(versionId));
     return Response.ok(response).build();
@@ -98,7 +92,6 @@
 
   @Override
   public Response delete(String vspId, String versionId, String deploymentFlavorId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_Deployment_flavor.toString());
     Version version = new Version(versionId);
     deploymentFlavorManager.deleteDeploymentFlavor(vspId, version, deploymentFlavorId);
     return Response.ok().build();
@@ -107,7 +100,6 @@
   @Override
   public Response update(DeploymentFlavorRequestDto request, String vspId, String versionId,
                          String deploymentFlavorId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_Deployment_flavor.toString());
     DeploymentFlavorEntity deploymentFlavorEntity =
         new MapDeploymentFlavorRequestDtoToDeploymentFlavorEntity().applyMapping(request,
             DeploymentFlavorEntity.class);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ImagesImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ImagesImpl.java
index b8e0f64..066a479 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ImagesImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ImagesImpl.java
@@ -2,8 +2,6 @@
 
 
 import org.apache.commons.collections.CollectionUtils;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.vendorsoftwareproduct.ComponentManager;
 import org.openecomp.sdc.vendorsoftwareproduct.ComponentManagerFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.ImageManager;
@@ -46,7 +44,6 @@
   @Override
   public Response create(ImageRequestDto request, String vspId, String versionId,
                          String componentId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Create_Image.toString());
     ImageEntity image =
         new MapImageRequestDtoToImageEntity().applyMapping(request, ImageEntity.class);
     image.setVspId(vspId);
@@ -63,7 +60,6 @@
 
   @Override
   public Response getImageSchema(String vspId, String versionId, String componentId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.GET_Image_Schema.toString());
     CompositionEntityResponse<Image> response = imageManager.getImageSchema(vspId);
     return Response.ok(response).build();
   }
@@ -71,7 +67,6 @@
   @Override
   public Response get(String vspId, String versionId, String componentId, String imageId,
                       String user) {
-    MdcUtil.initMdc(LoggerServiceName.GET_Image.toString());
     Version version = new Version(versionId);
     componentManager.validateComponentExistence(vspId, version, componentId);
     CompositionEntityResponse<Image> response =
@@ -82,7 +77,6 @@
 
   @Override
   public Response list(String vspId, String versionId, String componentId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.List_Images.toString());
     Version vspVersion = new Version(versionId);
     componentManager.validateComponentExistence(vspId, vspVersion, componentId);
     Collection<ImageEntity> images = imageManager.listImages(vspId, vspVersion, componentId);
@@ -99,7 +93,6 @@
   @Override
   public Response delete(String vspId, String versionId, String componentId, String imageId,
                          String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_Image.toString());
     Version vspVersion = new Version(versionId);
     componentManager.validateComponentExistence(vspId, vspVersion, componentId);
     imageManager.deleteImage(vspId, vspVersion, componentId, imageId);
@@ -109,7 +102,6 @@
   @Override
   public Response update(ImageRequestDto request, String vspId, String versionId,
                          String componentId, String imageId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_Image.toString());
     ImageEntity imageEntity = new MapImageRequestDtoToImageEntity().applyMapping(request,
         ImageEntity.class);
     imageEntity.setVspId(vspId);
@@ -129,7 +121,6 @@
   @Override
   public Response getQuestionnaire(String vspId, String versionId, String componentId,
                                    String imageId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_Questionnaire_Compute.toString());
     Version vspVersion = new Version(versionId);
     componentManager.validateComponentExistence(vspId, vspVersion, componentId);
     QuestionnaireResponse questionnaireResponse =
@@ -144,7 +135,6 @@
   @Override
   public Response updateQuestionnaire(String questionnaireData, String vspId, String versionId,
                                       String componentId, String imageId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_Questionnaire_Compute.toString());
     Version version = new Version(versionId);
     componentManager.validateComponentExistence(vspId, version, componentId);
     imageManager.updateImageQuestionnaire(vspId, version, componentId, imageId, questionnaireData);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NetworksImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NetworksImpl.java
index 5478327..1177eed 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NetworksImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NetworksImpl.java
@@ -21,8 +21,6 @@
 package org.openecomp.sdcrests.vsp.rest.services;
 
 import org.apache.commons.collections4.CollectionUtils;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.vendorsoftwareproduct.NetworkManager;
 import org.openecomp.sdc.vendorsoftwareproduct.NetworkManagerFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NetworkEntity;
@@ -59,7 +57,6 @@
 
   @Override
   public Response list(String vspId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.List_Network.toString());
     Collection<NetworkEntity> networks =
         networkManager.listNetworks(vspId, new Version(versionId));
 
@@ -74,7 +71,6 @@
 
   @Override
   public Response create(NetworkRequestDto request, String vspId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Create_Network.toString());
     NetworkEntity network =
         new MapNetworkRequestDtoToNetworkEntity().applyMapping(request, NetworkEntity.class);
     network.setVspId(vspId);
@@ -87,7 +83,6 @@
 
   @Override
   public Response get(String vspId, String versionId, String networkId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_Network.toString());
     CompositionEntityResponse<Network> response =
         networkManager.getNetwork(vspId,
             new Version(versionId), networkId
@@ -101,7 +96,6 @@
 
   @Override
   public Response delete(String vspId, String versionId, String networkId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_Network.toString());
     networkManager
         .deleteNetwork(vspId, new Version(versionId),
             networkId);
@@ -111,7 +105,6 @@
   @Override
   public Response update(NetworkRequestDto request, String vspId, String versionId,
                          String networkId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_Network.toString());
     NetworkEntity networkEntity =
         new MapNetworkRequestDtoToNetworkEntity().applyMapping(request, NetworkEntity.class);
     networkEntity.setVspId(vspId);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NicsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NicsImpl.java
index 738609a..cdd1053 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NicsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/NicsImpl.java
@@ -21,8 +21,6 @@
 package org.openecomp.sdcrests.vsp.rest.services;
 
 import org.apache.commons.collections4.CollectionUtils;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.vendorsoftwareproduct.ComponentManager;
 import org.openecomp.sdc.vendorsoftwareproduct.ComponentManagerFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.NicManager;
@@ -65,7 +63,6 @@
 
   @Override
   public Response list(String vspId, String versionId, String componentId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.List_nics.toString());
     Version vspVersion = new Version(versionId);
     componentManager.validateComponentExistence(vspId, vspVersion, componentId);
     Collection<NicEntity> nics = nicManager.listNics(vspId, vspVersion, componentId);
@@ -82,7 +79,6 @@
   @Override
   public Response create(NicRequestDto request, String vspId, String versionId, String componentId,
                          String user) {
-    MdcUtil.initMdc(LoggerServiceName.Create_nic.toString());
     NicEntity nic = new MapNicRequestDtoToNicEntity().applyMapping(request, NicEntity.class);
     nic.setVspId(vspId);
     nic.setVersion(new Version(versionId));
@@ -101,7 +97,6 @@
   @Override
   public Response get(String vspId, String versionId, String componentId, String nicId,
                       String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_nic.toString());
     Version vspVersion = new Version(versionId);
     componentManager.validateComponentExistence(vspId, vspVersion, componentId);
     CompositionEntityResponse<Nic> response =
@@ -116,7 +111,6 @@
   @Override
   public Response delete(String vspId, String versionId, String componentId, String nicId,
                          String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_nic.toString());
     Version vspVersion = new Version(versionId);
     componentManager.validateComponentExistence(vspId, vspVersion, componentId);
     nicManager.deleteNic(vspId, vspVersion, componentId, nicId);
@@ -127,7 +121,6 @@
   public Response update(NicRequestDto request, String vspId, String versionId, String componentId,
                          String nicId,
                          String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_nic.toString());
     NicEntity nicEntity = new MapNicRequestDtoToNicEntity().applyMapping(request, NicEntity.class);
     nicEntity.setVspId(vspId);
     nicEntity.setVersion(new Version(versionId));
@@ -147,7 +140,6 @@
   @Override
   public Response getQuestionnaire(String vspId, String versionId, String componentId, String nicId,
                                    String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_Questionnaire_nic.toString());
     Version vspVersion = new Version(versionId);
     componentManager.validateComponentExistence(vspId, vspVersion, componentId);
     QuestionnaireResponse questionnaireResponse =
@@ -162,7 +154,6 @@
   public Response updateQuestionnaire(String questionnaireData, String vspId, String versionId,
                                       String componentId,
                                       String nicId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_Questionnaire_nic.toString());
     Version vspVersion = new Version(versionId);
     componentManager.validateComponentExistence(vspId, vspVersion, componentId);
     nicManager
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
index aaee77d..e6be1dc 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/OrchestrationTemplateCandidateImpl.java
@@ -9,11 +9,6 @@
 import org.openecomp.sdc.activitylog.dao.type.ActivityLogEntity;
 import org.openecomp.sdc.activitylog.dao.type.ActivityType;
 import org.openecomp.sdc.common.errors.Messages;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.messages.AuditMessages;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdc.vendorsoftwareproduct.OrchestrationTemplateCandidateManager;
 import org.openecomp.sdc.vendorsoftwareproduct.OrchestrationTemplateCandidateManagerFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.types.OrchestrationTemplateActionResponse;
@@ -52,13 +47,8 @@
   private ActivityLogManager activityLogManager =
       ActivityLogManagerFactory.getInstance().createInterface();
 
-  private static final Logger logger =
-      LoggerFactory.getLogger(OrchestrationTemplateCandidateImpl.class);
-
   @Override
   public Response upload(String vspId, String versionId, Attachment fileToUpload, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Upload_File.toString());
-    logger.audit(AuditMessages.AUDIT_MSG + AuditMessages.UPLOAD_HEAT + vspId);
 
     String filename = fileToUpload.getContentDisposition().getParameter("filename");
     UploadFileResponse uploadFileResponse = candidateManager
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ProcessesImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ProcessesImpl.java
index ab67b68..bc22230 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ProcessesImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/ProcessesImpl.java
@@ -21,11 +21,6 @@
 package org.openecomp.sdcrests.vsp.rest.services;
 
 import org.apache.cxf.jaxrs.ext.multipart.Attachment;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
-import org.openecomp.sdc.logging.messages.AuditMessages;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
 import org.openecomp.sdcrests.vendorsoftwareproducts.types.ProcessRequestDto;
 import org.openecomp.sdcrests.vsp.rest.ComponentProcesses;
 import org.openecomp.sdcrests.vsp.rest.Processes;
@@ -41,65 +36,54 @@
 @Scope(value = "prototype")
 public class ProcessesImpl implements Processes {
 
-  private static final Logger logger = LoggerFactory.getLogger(ProcessesImpl.class);
   @Autowired
   private ComponentProcesses componentProcesses;
 
   @Override
   public Response list(String vspId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.List_Processes.toString());
     return componentProcesses.list(vspId, versionId, null, user);
   }
 
   @Override
   public Response deleteList(String vspId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_List_Processes.toString());
     return componentProcesses.deleteList(vspId, versionId, null, user);
   }
 
   @Override
   public Response create(ProcessRequestDto request, String vspId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Create_Process.toString());
     return componentProcesses.create(request, vspId, versionId, null, user);
   }
 
   @Override
   public Response get(String vspId, String versionId, String processId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_Processes.toString());
     return componentProcesses.get(vspId, versionId, null, processId, user);
   }
 
   @Override
   public Response delete(String vspId, String versionId, String processId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_Processes.toString());
     return componentProcesses.delete(vspId, versionId, null, processId, user);
   }
 
   @Override
   public Response update(ProcessRequestDto request, String vspId, String versionId,
                          String processId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_Process.toString());
     return componentProcesses.update(request, vspId, versionId, null, processId, user);
   }
 
   @Override
   public Response getUploadedFile(String vspId, String versionId, String processId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_Uploaded_File_Processes.toString());
     return componentProcesses.getUploadedFile(vspId, versionId, null, processId, user);
   }
 
   @Override
   public Response deleteUploadedFile(String vspId, String versionId, String processId,
                                      String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_Uploaded_File_Processes.toString());
     return componentProcesses.deleteUploadedFile(vspId, versionId, null, processId, user);
   }
 
   @Override
   public Response uploadFile(Attachment attachment, String vspId, String versionId,
                              String processId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Upload_File_Processes.toString());
-    logger.audit(AuditMessages.AUDIT_MSG + AuditMessages.UPLOAD_PROCESS_ARTIFACT + vspId);
     return componentProcesses.uploadFile(attachment, vspId, versionId, null, processId, user);
   }
 }
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java
index 2ea6116..fa6c778 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java
@@ -16,17 +16,6 @@
 
 package org.openecomp.sdcrests.vsp.rest.services;
 
-import static javax.ws.rs.core.HttpHeaders.CONTENT_DISPOSITION;
-import static org.openecomp.sdc.itempermissions.notifications.NotificationConstants.PERMISSION_USER;
-import static org.openecomp.sdc.logging.messages.AuditMessages.SUBMIT_VSP_ERROR;
-import static org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants.UniqueValues.VENDOR_SOFTWARE_PRODUCT_NAME;
-import static org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants.VALIDATION_VSP_NAME;
-import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.ITEM_ID;
-import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.ITEM_NAME;
-import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.SUBMIT_DESCRIPTION;
-import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.VERSION_ID;
-import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.VERSION_NAME;
-
 import org.apache.commons.collections4.MapUtils;
 import org.openecomp.core.util.UniqueValueUtil;
 import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum;
@@ -46,12 +35,7 @@
 import org.openecomp.sdc.itempermissions.impl.types.PermissionTypes;
 import org.openecomp.sdc.logging.api.Logger;
 import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.logging.context.MdcUtil;
 import org.openecomp.sdc.logging.messages.AuditMessages;
-import org.openecomp.sdc.logging.types.LoggerConstants;
-import org.openecomp.sdc.logging.types.LoggerErrorCode;
-import org.openecomp.sdc.logging.types.LoggerServiceName;
-import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
 import org.openecomp.sdc.notification.dtos.Event;
 import org.openecomp.sdc.notification.factories.NotificationPropagationManagerFactory;
 import org.openecomp.sdc.notification.services.NotificationPropagationManager;
@@ -115,6 +99,17 @@
 import java.util.Optional;
 import java.util.function.Predicate;
 
+import static javax.ws.rs.core.HttpHeaders.CONTENT_DISPOSITION;
+import static org.openecomp.sdc.itempermissions.notifications.NotificationConstants.PERMISSION_USER;
+import static org.openecomp.sdc.logging.messages.AuditMessages.SUBMIT_VSP_ERROR;
+import static org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants.UniqueValues.VENDOR_SOFTWARE_PRODUCT_NAME;
+import static org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants.VALIDATION_VSP_NAME;
+import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.ITEM_ID;
+import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.ITEM_NAME;
+import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.SUBMIT_DESCRIPTION;
+import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.VERSION_ID;
+import static org.openecomp.sdc.versioning.VersioningNotificationConstansts.VERSION_NAME;
+
 
 @Named
 @Service("vendorSoftwareProducts")
@@ -143,8 +138,6 @@
 
   @Override
   public Response createVsp(VspRequestDto vspRequestDto, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Create_VSP.toString());
-    LOGGER.audit(AuditMessages.AUDIT_MSG + AuditMessages.CREATE_VSP + vspRequestDto.getName());
 
     OnboardingMethod onboardingMethod = null;
     try {
@@ -204,8 +197,6 @@
 
   @Override
   public Response listVsps(String versionStatus, String user) {
-    MdcUtil.initMdc(LoggerServiceName.List_VSP.toString());
-
     Predicate<Item> itemPredicate;
     if (VersionStatus.Certified.name().equals(versionStatus)) {
       itemPredicate = item -> ItemType.vsp.name().equals(item.getType())
@@ -231,8 +222,6 @@
 
   @Override
   public Response getVsp(String vspId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_VSP.toString());
-
     Version version = versioningManager.get(vspId, new Version(versionId));
     VspDetails vspDetails = vendorSoftwareProductManager.getVsp(vspId, version);
     vspDetails.setWritetimeMicroSeconds(version.getModificationTime().getTime());
@@ -281,7 +270,6 @@
   @Override
   public Response updateVsp(String vspId, String versionId, VspDescriptionDto vspDescriptionDto,
                             String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_VSP.toString());
     VspDetails vspDetails =
         new MapVspDescriptionDtoToVspDetails().applyMapping(vspDescriptionDto, VspDetails.class);
     vspDetails.setId(vspId);
@@ -294,7 +282,6 @@
 
   @Override
   public Response deleteVsp(String vspId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Delete_VSP.toString());
     vendorSoftwareProductManager.deleteVsp(vspId);
 
     return Response.ok().build();
@@ -365,7 +352,6 @@
 
   @Override
   public Response getOrchestrationTemplate(String vspId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_Uploaded_File.toString());
     byte[] orchestrationTemplateFile =
         vendorSoftwareProductManager.getOrchestrationTemplateFile(vspId, new Version(versionId));
 
@@ -379,7 +365,6 @@
 
   @Override
   public Response listPackages(String category, String subCategory, String user) {
-    MdcUtil.initMdc(LoggerServiceName.List_Packages.toString());
     List<PackageInfo> packageInfoList =
         vendorSoftwareProductManager.listPackages(category, subCategory);
 
@@ -396,20 +381,14 @@
 
   @Override
   public Response getTranslatedFile(String vspId, String versionName, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_Translated_File.toString());
-
     List<Version> versions = versioningManager.list(vspId);
     Version version;
-    if (versionName == null) {
-      version = versions.stream().filter(ver -> VersionStatus.Certified == ver.getStatus())
-          .max(Comparator.comparingDouble(o -> Double.parseDouble(o.getName()))).orElseThrow(() -> {
-            return new CoreException(new PackageNotFoundErrorBuilder(vspId).build());
-          });
-    } else {
+    if (versionName == null) version = versions.stream().filter(ver -> VersionStatus.Certified == ver.getStatus())
+            .max(Comparator.comparingDouble(o -> Double.parseDouble(o.getName())))
+            .orElseThrow(() -> new CoreException(new PackageNotFoundErrorBuilder(vspId).build()));
+    else {
       version = versions.stream().filter(ver -> versionName.equals(ver.getName()))
-          .findFirst().orElseThrow(() -> {
-            return new CoreException(new PackageNotFoundErrorBuilder(vspId).build());
-          });
+          .findFirst().orElseThrow(() -> new CoreException(new PackageNotFoundErrorBuilder(vspId).build()));
 
       if (version.getStatus() != VersionStatus.Certified) {
         throw new CoreException(new RequestedVersionInvalidErrorBuilder().build());
@@ -431,7 +410,6 @@
 
   @Override
   public Response getQuestionnaire(String vspId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_Questionnaire_VSP.toString());
     QuestionnaireResponse questionnaireResponse =
         vendorSoftwareProductManager.getVspQuestionnaire(vspId, new Version(versionId));
 
@@ -449,7 +427,6 @@
   @Override
   public Response updateQuestionnaire(String questionnaireData, String vspId, String
       versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Update_Questionnaire_VSP.toString());
     vendorSoftwareProductManager
         .updateVspQuestionnaire(vspId, new Version(versionId), questionnaireData);
     return Response.ok().build();
@@ -464,7 +441,6 @@
 
   @Override
   public Response getVspInformationArtifact(String vspId, String versionId, String user) {
-    MdcUtil.initMdc(LoggerServiceName.Get_Information_Artifact.toString());
     File textInformationArtifact =
         vendorSoftwareProductManager.getInformationArtifact(vspId, new Version(versionId));
 
@@ -494,8 +470,6 @@
 
   private Optional<ValidationResponse> submit(String vspId, Version version, String message,
                                               String user) throws IOException {
-    MdcUtil.initMdc(LoggerServiceName.Submit_VSP.toString());
-    LOGGER.audit(AuditMessages.AUDIT_MSG + AuditMessages.SUBMIT_VSP + vspId);
 
     ValidationResponse validationResponse = vendorSoftwareProductManager.validate(vspId, version);
     Map<String, List<ErrorMessage>> compilationErrors =
@@ -582,8 +556,6 @@
   }
 
   private Response createPackage(String vspId, Version version) throws IOException {
-    MdcUtil.initMdc(LoggerServiceName.Create_Package.toString());
-
     Version retrievedVersion = versioningManager.get(vspId, version);
     if (retrievedVersion.getStatus() != VersionStatus.Certified) {
       throw new CoreException(
diff --git a/openecomp-be/backend/openecomp-sdc-action-manager/pom.xml b/openecomp-be/backend/openecomp-sdc-action-manager/pom.xml
index 9339a93..e61821f 100644
--- a/openecomp-be/backend/openecomp-sdc-action-manager/pom.xml
+++ b/openecomp-be/backend/openecomp-sdc-action-manager/pom.xml
@@ -82,6 +82,7 @@
             <groupId>org.openecomp.sdc</groupId>
             <artifactId>openecomp-sdc-logging-core</artifactId>
             <version>${project.version}</version>
+            <scope>runtime</scope>
         </dependency>
     </dependencies>
 
diff --git a/openecomp-be/backend/openecomp-sdc-activity-log-manager/pom.xml b/openecomp-be/backend/openecomp-sdc-activity-log-manager/pom.xml
index 4b0db49..da02742 100644
--- a/openecomp-be/backend/openecomp-sdc-activity-log-manager/pom.xml
+++ b/openecomp-be/backend/openecomp-sdc-activity-log-manager/pom.xml
@@ -29,6 +29,7 @@
             <groupId>org.openecomp.sdc</groupId>
             <artifactId>openecomp-sdc-logging-core</artifactId>
             <version>${project.version}</version>
+            <scope>runtime</scope>
         </dependency>
         <dependency>
             <groupId>org.openecomp.sdc.core</groupId>
diff --git a/openecomp-be/backend/openecomp-sdc-application-config-manager/pom.xml b/openecomp-be/backend/openecomp-sdc-application-config-manager/pom.xml
index 85b931a..dd69043 100644
--- a/openecomp-be/backend/openecomp-sdc-application-config-manager/pom.xml
+++ b/openecomp-be/backend/openecomp-sdc-application-config-manager/pom.xml
@@ -42,6 +42,7 @@
             <groupId>org.openecomp.sdc</groupId>
             <artifactId>openecomp-sdc-logging-core</artifactId>
             <version>${project.version}</version>
+            <scope>runtime</scope>
         </dependency>
     </dependencies>
     
diff --git a/openecomp-be/backend/openecomp-sdc-healthcheck-manager/pom.xml b/openecomp-be/backend/openecomp-sdc-healthcheck-manager/pom.xml
index 35777c2..2b3f88e 100644
--- a/openecomp-be/backend/openecomp-sdc-healthcheck-manager/pom.xml
+++ b/openecomp-be/backend/openecomp-sdc-healthcheck-manager/pom.xml
@@ -28,6 +28,7 @@
             <groupId>org.openecomp.sdc</groupId>
             <artifactId>openecomp-sdc-logging-core</artifactId>
             <version>${project.version}</version>
+            <scope>runtime</scope>
         </dependency>
         <dependency>
             <groupId>org.openecomp.sdc.core</groupId>
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/pom.xml b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/pom.xml
index 7c8bde0..0d977ec 100644
--- a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/pom.xml
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-api/pom.xml
@@ -38,6 +38,7 @@
             <groupId>org.openecomp.sdc</groupId>
             <artifactId>openecomp-sdc-logging-core</artifactId>
             <version>${project.version}</version>
+            <scope>runtime</scope>
         </dependency>
     </dependencies>
 
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/pom.xml b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/pom.xml
index a1337f6..3a8978e 100644
--- a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/pom.xml
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/pom.xml
@@ -17,6 +17,7 @@
             <groupId>org.openecomp.sdc</groupId>
             <artifactId>openecomp-sdc-logging-core</artifactId>
             <version>${project.version}</version>
+            <scope>runtime</scope>
         </dependency>
         <dependency>
             <groupId>org.openecomp.sdc.core</groupId>
diff --git a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/src/main/java/org/openecomp/sdc/logging/context/impl/MdcDataErrorMessage.java b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/src/main/java/org/openecomp/sdc/logging/context/impl/MdcDataErrorMessage.java
deleted file mode 100644
index a9244e3..0000000
--- a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/src/main/java/org/openecomp/sdc/logging/context/impl/MdcDataErrorMessage.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright © 2016-2017 European Support Limited
- *
- * 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
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.openecomp.sdc.logging.context.impl;
-
-import org.openecomp.sdc.logging.types.LoggerConstants;
-import org.slf4j.MDC;
-
-
-public class MdcDataErrorMessage {
-
-  private final String targetEntity;
-  private final String targetServiceName;
-  private final String errorDescription;
-  private final String level;
-  private final String errorCode;
-
-  /**
-   * Instantiates a new Mdc data error message.
-   *
-   * @param targetEntity      the target entity
-   * @param targetServiceName the target service name
-   * @param errorCategory     the error category
-   * @param errorCode         the error code
-   * @param errorDescription  the error description
-   */
-  public MdcDataErrorMessage(String targetEntity, String targetServiceName, String errorCategory,
-                             String errorCode, String errorDescription) {
-    this.level = errorCategory;
-    this.errorCode = errorCode;
-    this.targetEntity = targetEntity;
-    this.targetServiceName = targetServiceName;
-    this.errorDescription = errorDescription;
-
-    this.setMdcValues();
-  }
-
-  /**
-   * Create error message and update mdc.
-   *
-   * @param targetEntity      the target entity
-   * @param targetServiceName the target service name
-   * @param level             the level
-   * @param errorCode         the error code
-   * @param errorDescription  the error description
-   */
-  public static void createErrorMessageAndUpdateMdc(String targetEntity, String targetServiceName,
-                                                    String level, String errorCode,
-                                                    String errorDescription) {
-    // don't remove this line although it seems useless
-    new MdcDataErrorMessage(targetEntity, targetServiceName, level, errorCode, errorDescription);
-  }
-
-  public void setMdcValues() {
-    MDC.put(LoggerConstants.ERROR_CATEGORY, this.level);
-    MDC.put(LoggerConstants.ERROR_CODE, this.errorCode);
-    MDC.put(LoggerConstants.TARGET_ENTITY, this.targetEntity);
-    MDC.put(LoggerConstants.TARGET_SERVICE_NAME, this.targetServiceName);
-    MDC.put(LoggerConstants.ERROR_DESCRIPTION, this.errorDescription);
-  }
-}
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/pom.xml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/pom.xml
index e2e05c8..b483bb4 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-core/pom.xml
@@ -25,6 +25,7 @@
             <groupId>org.openecomp.sdc</groupId>
             <artifactId>openecomp-sdc-logging-core</artifactId>
             <version>${project.version}</version>
+            <scope>runtime</scope>
         </dependency>
         <dependency>
             <groupId>junit</groupId>
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml
index 4b08547..0b2cb5f 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml
@@ -36,6 +36,7 @@
             <groupId>org.openecomp.sdc</groupId>
             <artifactId>openecomp-sdc-logging-core</artifactId>
             <version>${project.version}</version>
+            <scope>runtime</scope>
         </dependency>
         <dependency>
             <groupId>org.openecomp.sdc</groupId>
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/pom.xml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/pom.xml
index b37fe64..fe342f5 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-sdk/pom.xml
@@ -17,6 +17,7 @@
             <groupId>org.openecomp.sdc</groupId>
             <artifactId>openecomp-sdc-logging-core</artifactId>
             <version>${project.version}</version>
+            <scope>runtime</scope>
         </dependency>
         <dependency>
             <groupId>org.testng</groupId>
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml
index dcf2c6a..c63bd55 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml
@@ -86,6 +86,7 @@
             <groupId>org.openecomp.sdc</groupId>
             <artifactId>openecomp-sdc-logging-core</artifactId>
             <version>${project.version}</version>
+            <scope>runtime</scope>
         </dependency>
     </dependencies>
 </project>
diff --git a/openecomp-be/lib/openecomp-tosca-lib/pom.xml b/openecomp-be/lib/openecomp-tosca-lib/pom.xml
index 38122c7..14b4d77 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/pom.xml
+++ b/openecomp-be/lib/openecomp-tosca-lib/pom.xml
@@ -50,6 +50,7 @@
             <groupId>org.openecomp.sdc</groupId>
             <artifactId>openecomp-sdc-logging-core</artifactId>
             <version>${project.version}</version>
+            <scope>runtime</scope>
         </dependency>
         <dependency>
             <groupId>org.openecomp.sdc.common</groupId>
