diff --git a/filters/features/ccsdk-filters/pom.xml b/filters/features/ccsdk-filters/pom.xml
index b1677a7..ae8f2df 100644
--- a/filters/features/ccsdk-filters/pom.xml
+++ b/filters/features/ccsdk-filters/pom.xml
@@ -15,43 +15,32 @@
 	<packaging>feature</packaging>
 
 	<name>ccsdk-sli-core :: filters :: ${project.artifactId}</name>
-	<dependencyManagement>
-		<dependencies>
-		
-			<dependency>
-				<groupId>org.onap.ccsdk.sli.core</groupId>
-				<artifactId>sli-common</artifactId>
-				<version>${project.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>org.onap.ccsdk.sli.core</groupId>
-				<artifactId>sli-provider</artifactId>
-				<version>${project.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>org.onap.ccsdk.sli.core</groupId>
-				<artifactId>dblib-provider</artifactId>
-				<version>${project.version}</version>
-			</dependency>
-		</dependencies>
-	</dependencyManagement>
-	
 
 	<dependencies>
-
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<artifactId>ccsdk-sli</artifactId>
-			<version>${project.version}</version>
-			<type>xml</type>
-			<classifier>features</classifier>
-		</dependency>
-
 		<dependency>
 			<groupId>${project.groupId}</groupId>
 			<artifactId>filters-provider</artifactId>
 			<version>${project.version}</version>
 		</dependency>
-
 	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.karaf.tooling</groupId>
+				<artifactId>karaf-maven-plugin</artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<excludedArtifactIds>
+						<!-- let opendaylight start these features/jars to avoid conflicts at runtime -->
+						<excludedArtifactId>slf4j-api</excludedArtifactId>
+						<excludedArtifactId>javax.annotation-api</excludedArtifactId>
+						<excludedArtifactId>javax.servlet-api</excludedArtifactId>
+						<excludedArtifactId>javax.ws.rs-api</excludedArtifactId>
+					</excludedArtifactIds>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
 </project>
diff --git a/filters/installer/pom.xml b/filters/installer/pom.xml
index 4be194c..a8aa4e9 100755
--- a/filters/installer/pom.xml
+++ b/filters/installer/pom.xml
@@ -23,28 +23,6 @@
 		<include.transitive.dependencies>false</include.transitive.dependencies>
 	</properties>
 
-	<dependencyManagement>
-		<dependencies>
-		
-			<dependency>
-				<groupId>org.onap.ccsdk.sli.core</groupId>
-				<artifactId>sli-common</artifactId>
-				<version>${project.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>org.onap.ccsdk.sli.core</groupId>
-				<artifactId>sli-provider</artifactId>
-				<version>${project.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>org.onap.ccsdk.sli.core</groupId>
-				<artifactId>dblib-provider</artifactId>
-				<version>${project.version}</version>
-			</dependency>
-		</dependencies>
-	</dependencyManagement>
-	
-
 	<dependencies>
 
 		<dependency>
diff --git a/filters/provider/pom.xml b/filters/provider/pom.xml
index 3a7090d..0da11a1 100755
--- a/filters/provider/pom.xml
+++ b/filters/provider/pom.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+ <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
@@ -15,78 +15,16 @@
     <packaging>bundle</packaging>
 
     <name>ccsdk-sli-core :: filters :: ${project.artifactId}</name>
-    <url>http://maven.apache.org</url>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-       <!--  Ignore deprecated classes in coverage counts -->
-       <sonar.coverage.exclusions>**/RequestResponseDbLoggingFilter.java</sonar.coverage.exclusions>
-    </properties>
-
-	<dependencyManagement>
-		<dependencies>
-		
-			<dependency>
-				<groupId>org.onap.ccsdk.sli.core</groupId>
-				<artifactId>sli-common</artifactId>
-				<version>${project.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>org.onap.ccsdk.sli.core</groupId>
-				<artifactId>sli-provider</artifactId>
-				<version>${project.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>org.onap.ccsdk.sli.core</groupId>
-				<artifactId>dblib-provider</artifactId>
-				<version>${project.version}</version>
-			</dependency>
-		</dependencies>
-	</dependencyManagement>
-	
 	
     <dependencies>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>${junit.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.mockito</groupId>
-            <artifactId>mockito-core</artifactId>
-            <scope>test</scope>
+            <groupId>org.onap.logging-analytics</groupId>
+            <artifactId>logging-filter-base</artifactId>
+            <version>1.5.0</version>
         </dependency>
         <dependency>
             <groupId>javax.servlet</groupId>
             <artifactId>javax.servlet-api</artifactId>
         </dependency>
-
-
- 		<dependency>
-			<groupId>org.osgi</groupId>
-			<artifactId>org.osgi.core</artifactId>
-			<scope>provided</scope>
-		</dependency>
-
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>jcl-over-slf4j</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>commons-codec</groupId>
-            <artifactId>commons-codec</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.onap.ccsdk.sli.core</groupId>
-            <artifactId>sli-common</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
     </dependencies>
 </project>
diff --git a/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/ControllerAuditLogFilter.java b/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/ControllerAuditLogFilter.java
new file mode 100644
index 0000000..7805e36
--- /dev/null
+++ b/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/ControllerAuditLogFilter.java
@@ -0,0 +1,40 @@
+package org.onap.ccsdk.sli.core.filters;
+
+import javax.servlet.http.HttpServletRequest;
+import org.onap.logging.filter.base.AuditLogServletFilter;
+import org.onap.logging.ref.slf4j.ONAPLogConstants;
+import org.slf4j.MDC;
+
+public class ControllerAuditLogFilter extends AuditLogServletFilter {
+    private static final String MDC_HTTP_METHOD_KEY = "HttpMethod";
+
+    @Override
+    protected void additionalPreHandling(HttpServletRequest httpServletRequest) {
+        // Don't overwrite service instance id if it was set outside of this automated method
+        if (MDC.get(ONAPLogConstants.MDCs.SERVICE_INSTANCE_ID) == null) {
+            String serviceInstanceId = getServiceInstanceId(httpServletRequest.getPathInfo());
+            if (serviceInstanceId != null) {
+                MDC.put(ONAPLogConstants.MDCs.SERVICE_INSTANCE_ID, serviceInstanceId);
+            }
+        }
+        MDC.put(MDC_HTTP_METHOD_KEY, httpServletRequest.getMethod());
+    }
+
+    // restconf URLs follow a pattern, this method attempts to extract the service instance id according to that pattern
+    protected String getServiceInstanceId(String path) {
+        int idx = path.indexOf("service-list");
+        if (idx != -1) {
+            // chomp off service-list/
+            String str = path.substring(idx + 13);
+            idx = str.indexOf("/");
+            //if there is another forward slash with more information chomp it off
+            if (idx != -1) {
+                return str.substring(0, idx);
+            } else {
+                return str;
+            }
+        }
+        return null;
+    }
+
+}
diff --git a/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/ControllerPayloadLoggingFilter.java b/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/ControllerPayloadLoggingFilter.java
new file mode 100644
index 0000000..3f9f93f
--- /dev/null
+++ b/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/ControllerPayloadLoggingFilter.java
@@ -0,0 +1,7 @@
+package org.onap.ccsdk.sli.core.filters;
+
+import org.onap.logging.filter.base.PayloadLoggingServletFilter;
+
+public class ControllerPayloadLoggingFilter extends PayloadLoggingServletFilter {
+
+}
diff --git a/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/FiltersService.java b/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/FiltersService.java
deleted file mode 100644
index 9587e8d..0000000
--- a/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/FiltersService.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package org.onap.ccsdk.sli.core.filters;
-
-public interface FiltersService {
-}
diff --git a/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/FiltersServiceImpl.java b/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/FiltersServiceImpl.java
deleted file mode 100644
index 12370ca..0000000
--- a/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/FiltersServiceImpl.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP : CCSDK
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights
- * 						reserved.
- * ================================================================================
- * 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.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.ccsdk.sli.core.filters;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class FiltersServiceImpl implements FiltersService {
-	private static final Logger LOG = LoggerFactory.getLogger(FiltersServiceImpl.class);
-
-	public FiltersServiceImpl() {
-		LOG.debug("Registering {}", FiltersServiceImpl.class.getName());
-	}
-}
diff --git a/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/LogFilter.java b/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/LogFilter.java
deleted file mode 100644
index 4481ab9..0000000
--- a/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/LogFilter.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP : CCSDK
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights
- * 						reserved.
- * ================================================================================
- * Modifications Copyright (C) 2018 IBM.
- * ================================================================================
- * 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.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.ccsdk.sli.core.filters;
-
-import java.io.IOException;
-import java.util.UUID;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.codec.binary.Base64;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.MDC;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.TimeZone;
-
-
-
-/**
- * Logs IN request according ECOMP Logging Guidelines at https://tspace.web.att.com/viewer/app/lcfiles/ae5f7751-39da-4c6b-8a83-5836c8c815e1/content
- */
-public class LogFilter implements Filter {
-
-    //X-ECOMP is shared between audit and metric
-    public static final String BEGIN_TIMESTAMP = "AUDIT-BeginTimestamp";
-    public static final String END_TIMESTAMP = "AUDIT-EndTimestamp";
-    public static final String REQUEST_ID = "X-ECOMP-RequestID";
-    public static final String SERVICE_INSTANCE = "X-ECOMP-ServiceInstanceID";
-    public static final String THREAD_ID ="X-ECOMP-ThreadId"; //optional
-    public static final String PHYSICAL_SERVER_NAME="X-ECOMP-PhysicalServerName"; //optional
-    public static final String SERVICE_NAME="X-ECOMP-ServiceName";
-    public static final String PARTNER_NAME="X-ECOMP-PartnerName";
-    public static final String STATUS_CODE="AUDIT-StatusCode";
-    public static final String RESP_CODE="AUDIT-ResponseCode";
-    public static final String RESP_DESC="AUDIT-ResponseDescription";
-    public static final String INSTANCE_UUID="AUDIT-InstanceUUID";
-    public static final String CATEGORY="AUDIT-INFO";
-    public static final String SEVERITY ="AUDIT-Severity"; //optional
-    public static final String SERVER_IP="AUDIT-ServerIP"; //by chef node['ip']
-    public static final String ELAPSED_TIME="AUDIT-ElapsedTime";
-    public static final String SERVER_HOST="AUDIT-Server";//by chef node['fqdn']
-    public static final String CLIENT_IP="AUDIT-ClientIPaddress";
-    public static final String CLASS="AUDIT-Classname"; //optional
-    public static final String UNUSED="AUDIT-Unused"; //empty
-    public static final String PROCESS_KEY="AUDIT-ProcessKey"; //optional
-    public static final String CUST_1="AUDIT-CustomField1";//optional
-    public static final String CUST_2="AUDIT-CustomField2"; //optional
-    public static final String CUST_3="AUDIT-CustomField3"; //optional
-    public static final String CUST_4="AUDIT-CustomField4"; //optional
-    public static final String DETAIL_MESSAGE="AUDIT-DetailMessage";//optional
-
-
-    private static final Logger log = LoggerFactory.getLogger(LogFilter.class);
-    private static final Logger AUDIT = LoggerFactory.getLogger("org.onap.ccsdk.sli.core.filters.audit");
-    @Override
-    public void destroy() {
-    	// this method does nothing
-        }
-
-    @Override
-    public void doFilter(final ServletRequest request, final ServletResponse response,
-                final FilterChain filterChain) throws IOException, ServletException {
-
-            long startTime = System.currentTimeMillis();
-            try {
-
-                if ( request != null && request instanceof HttpServletRequest ) {
-                    pre((HttpServletRequest)request);
-                }
-                filterChain.doFilter(request, response);
-
-
-            } finally {
-
-                if (request != null && request instanceof HttpServletRequest ) {
-                    post((HttpServletRequest)request,(HttpServletResponse)response,startTime);
-                }
-                MDC.clear();
-            }
-
-        }
-
-    @Override
-    public void init(FilterConfig filterConfig) throws ServletException {
-    	// this method does nothing
-        }
-
-
-
-    private void pre(HttpServletRequest request) {
-
-        UUID uuid = UUID.randomUUID();
-        // check if uuid is in header X-ECOMP-RequestID
-
-        String ecompUUID = request.getHeader(REQUEST_ID);
-
-        if (ecompUUID != null && ecompUUID.length() > 0) {
-            try {
-                uuid = UUID.fromString(ecompUUID);
-                log.info("UUID is ECOMP UUID " + uuid.toString());
-            } catch (Exception ex){
-                log.warn("Failed to convert ECOMP UUID to java.util.UUID format:" + ecompUUID,ex);
-            }
-        }
-        MDC.put(REQUEST_ID, uuid.toString());
-
-        String userName="unknown";
-
-        
-        // going directly after Authorization header
-        if (request.getHeader("Authorization") != null) {
-            String authzHeader = request.getHeader("Authorization");
-            String usernameAndPassword = new String(Base64.decodeBase64(authzHeader.substring(6).getBytes()));
-
-            int userNameIndex = usernameAndPassword.indexOf(':');
-            String username = usernameAndPassword.substring(0, userNameIndex);
-            userName = username;
-
-        }
-
-
-        MDC.put(PARTNER_NAME, userName);
-        //just to initilaze for metric logger (outbound calls)
-        MDC.put("X-ECOMP-TargetEntity","");
-        MDC.put("X-ECOMP-TargetServiceName","");
-
-        MDC.put(SERVICE_NAME,request.getRequestURL().toString());
-        MDC.put(SERVICE_INSTANCE,"");
-
-    }
-
-
-    private void post(HttpServletRequest request,HttpServletResponse response,long startTime) {
-
-        MDC.put(BEGIN_TIMESTAMP,asIso8601(startTime));
-        MDC.put(END_TIMESTAMP,asIso8601(System.currentTimeMillis()));
-        MDC.put(SERVICE_NAME,request.getRequestURL().toString());
-        int idx = request.getPathInfo().lastIndexOf(':');
-        String instance = "";
-        if ( idx != -1 ) {
-			instance = request.getPathInfo().substring(idx+1);
-		}
-        MDC.put(SERVICE_INSTANCE,instance);
-        MDC.put(THREAD_ID,"");
-        MDC.put(PHYSICAL_SERVER_NAME,"");
-        if ( response.getStatus() >= 400 ) {
-			MDC.put(STATUS_CODE,"ERROR");
-		} else {
-			MDC.put(STATUS_CODE,"COMPLETE");
-		}
-
-        MDC.put(RESP_CODE, Integer.toString(response.getStatus()));
-        MDC.put(RESP_DESC,"");
-        MDC.put(INSTANCE_UUID,"");
-        MDC.put(CATEGORY,"");
-        MDC.put(SEVERITY,"");
-        //MDC.put(SERVER_IP,""); //by chef
-        MDC.put(ELAPSED_TIME,Long.toString(System.currentTimeMillis() - startTime));
-        //MDC.put(SERVER_HOST,""); //by chef
-        String forwardedHost = request.getHeader("X-Forwarded-For");
-        if (forwardedHost != null) {
-            MDC.put(CLIENT_IP, forwardedHost);
-        }
-        else{
-        MDC.put(CLIENT_IP,request.getRemoteHost());
-        }
-        MDC.put(CLASS,"");
-        MDC.put(UNUSED,"");
-        MDC.put(PROCESS_KEY,"");
-        MDC.put(CUST_1,"");
-        MDC.put(CUST_2,"");
-        MDC.put(CUST_3,"");
-        MDC.put(CUST_4,"");
-        MDC.put(DETAIL_MESSAGE,request.getMethod());
-
-        AUDIT.info("");
-    }
-
-    private String asIso8601(Date date) {
-        TimeZone tz = TimeZone.getTimeZone("UTC");
-        DateFormat df = new SimpleDateFormat("yyy-MM-dd'T'HH:mm:ss.SS'+00:00'");
-        df.setTimeZone(tz);
-        return df.format(date);
-    }
-
-    private String asIso8601(long tsInMillis) {
-        return asIso8601(new Date(tsInMillis));
-    }
-
-
-}
diff --git a/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/RequestResponseLoggingFilter.java b/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/RequestResponseLoggingFilter.java
deleted file mode 100644
index e24a752..0000000
--- a/filters/provider/src/main/java/org/onap/ccsdk/sli/core/filters/RequestResponseLoggingFilter.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP : CCSDK
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights
- *                      reserved.
- * ================================================================================
- * Modifications Copyright (C) 2018 IBM.
- * ================================================================================
- * 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.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.ccsdk.sli.core.filters;
-
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.util.Enumeration;
-import java.util.zip.GZIPInputStream;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ReadListener;
-import javax.servlet.ServletException;
-import javax.servlet.ServletInputStream;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.WriteListener;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpServletResponseWrapper;
-
-public class RequestResponseLoggingFilter implements Filter {
-
-    private static org.slf4j.Logger log =
-            org.slf4j.LoggerFactory.getLogger("org.onap.ccsdk.sli.core.filters.request.response");
-
-    private static class ByteArrayServletStream extends ServletOutputStream {
-
-        ByteArrayOutputStream baos;
-
-        ByteArrayServletStream(ByteArrayOutputStream baos) {
-            this.baos = baos;
-        }
-
-        @Override
-        public void write(int param) throws IOException {
-            baos.write(param);
-        }
-
-        @Override
-        public boolean isReady() {
-            return true;
-        }
-
-        @Override
-        public void setWriteListener(WriteListener arg0) {
-            // this method does nothing
-
-        }
-    }
-
-    private static class ByteArrayPrintWriter extends PrintWriter {
-        private ByteArrayOutputStream baos;
-        private int errorCode = -1;
-        private String errorMsg = "";
-        private boolean errored = false;
-
-        public ByteArrayPrintWriter(ByteArrayOutputStream out) {
-            super(out);
-            this.baos = out;
-        }
-
-        public ServletOutputStream getStream() {
-            return new ByteArrayServletStream(baos);
-        }
-        
-        public Boolean hasErrored() {
-            return errored;
-        }
-        public int getErrorCode() {
-            return errorCode;
-        }
-        public String getErrorMsg() {
-            return errorMsg;
-        }
-        
-        public void setError(int code) {
-            errorCode = code;
-            errored = true;
-        }
-        
-        public void setError(int code, String msg) {
-             errorMsg = msg;
-             errorCode = code;
-             errored = true;
-        }
-
-    }
-
-    private class BufferedServletInputStream extends ServletInputStream {
-
-        ByteArrayInputStream bais;
-
-        public BufferedServletInputStream(ByteArrayInputStream bais) {
-            this.bais = bais;
-        }
-
-        @Override
-        public int available() {
-            return bais.available();
-        }
-
-        @Override
-        public int read() {
-            return bais.read();
-        }
-
-        @Override
-        public int read(byte[] buf, int off, int len) {
-            return bais.read(buf, off, len);
-        }
-
-        @Override
-        public boolean isFinished() {
-            return available() < 1;
-        }
-
-        @Override
-        public boolean isReady() {
-            return true;
-        }
-
-        @Override
-        public void setReadListener(ReadListener arg0) {
-            // this method does nothing
-        }
-
-    }
-
-    private class BufferedRequestWrapper extends HttpServletRequestWrapper {
-
-        ByteArrayInputStream bais;
-
-        ByteArrayOutputStream baos;
-
-        BufferedServletInputStream bsis;
-
-        byte[] buffer;
-
-        public BufferedRequestWrapper(HttpServletRequest req) throws IOException {
-            super(req);
-
-            InputStream is = req.getInputStream();
-            baos = new ByteArrayOutputStream();
-            byte[] buf = new byte[1024];
-            int letti;
-            while ((letti = is.read(buf)) > 0) {
-                baos.write(buf, 0, letti);
-            }
-            buffer = baos.toByteArray();
-
-        }
-
-        @Override
-        public ServletInputStream getInputStream() {
-            try {
-                bais = new ByteArrayInputStream(buffer);
-                bsis = new BufferedServletInputStream(bais);
-            } catch (Exception ex) {
-                log.error("Exception in getInputStream", ex);
-            }
-
-            return bsis;
-        }
-
-        public byte[] getBuffer() {
-            return buffer;
-        }
-
-    }
-
-    @Override
-    public void init(FilterConfig filterConfig) throws ServletException {
-        // this method does nothing
-    }
-
-    @Override
-    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
-            throws IOException, ServletException {
-
-        final HttpServletRequest httpRequest = (HttpServletRequest) servletRequest;
-        BufferedRequestWrapper bufferedRequest = new BufferedRequestWrapper(httpRequest);
-
-        StringBuilder requestHeaders = new StringBuilder("REQUEST|");
-        requestHeaders.append(httpRequest.getMethod());
-        requestHeaders.append(":");
-        requestHeaders.append(httpRequest.getRequestURL().toString());
-        requestHeaders.append("|");
-        String header;
-        for (Enumeration<String> e = httpRequest.getHeaderNames(); e.hasMoreElements();) {
-            header = e.nextElement();
-            requestHeaders.append(header);
-            requestHeaders.append(":");
-            requestHeaders.append(httpRequest.getHeader(header));
-            requestHeaders.append(";");
-
-        }
-        log.info(requestHeaders.toString());
-
-        log.info("REQUEST BODY|" + new String(bufferedRequest.getBuffer()));
-
-        final HttpServletResponse response = (HttpServletResponse) servletResponse;
-        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        final ByteArrayPrintWriter pw = new ByteArrayPrintWriter(baos);
-
-        HttpServletResponse wrappedResp = new HttpServletResponseWrapper(response) {
-            @Override
-            public PrintWriter getWriter() {
-                return pw;
-            }
-
-            @Override
-            public ServletOutputStream getOutputStream() {
-                return pw.getStream();
-            }
-            
-            @Override
-            public void sendError(int sc) throws IOException {
-                super.sendError(sc);
-                pw.setError(sc);
-                
-            }
-            @Override
-            public void sendError(int sc, String msg) throws IOException {
-                super.sendError(sc, msg);
-                pw.setError(sc, msg);
-            }
-        };
-
-        try {
-            filterChain.doFilter(bufferedRequest, wrappedResp);
-        } catch (Exception e) {
-            log.error("Chain Exception", e);
-            throw e;
-        } finally {
-            try {
-                byte[] bytes = baos.toByteArray();
-                StringBuilder responseHeaders = new StringBuilder("RESPONSE HEADERS|");
-
-                for (String headerName : response.getHeaderNames()) {
-                    responseHeaders.append(headerName);
-                    responseHeaders.append(":");
-                    responseHeaders.append(response.getHeader(headerName));
-                    responseHeaders.append(";");
-                }
-                responseHeaders.append("Status:");
-                responseHeaders.append(response.getStatus());
-                responseHeaders.append(";IsCommited:" + wrappedResp.isCommitted());
-                
-                log.info(responseHeaders.toString());
-                
-                if ("gzip".equals(response.getHeader("Content-Encoding"))) {
-
-                    log.info("UNGZIPED RESPONSE BODY|" + decompressGZIPByteArray(bytes));
-
-                } else {
-
-                    log.info("RESPONSE BODY|" + new String(bytes));
-                }
-
-                if (pw.hasErrored()) {
-                    log.info("ERROR RESPONSE|" + pw.getErrorCode() + ":" + pw.getErrorMsg());
-                } else {
-                    if (!wrappedResp.isCommitted()){
-                        response.getOutputStream().write(bytes);
-                        response.getOutputStream().flush();
-                    }
-                }
-
-            } catch (Exception e) {
-                log.error("Exception in response filter", e);
-            }
-
-        }
-    }
-
-    @Override
-    public void destroy() {
-        // this method does nothing
-    }
-
-    private String decompressGZIPByteArray(byte[] bytes) {
-
-        BufferedReader in = null;
-        InputStreamReader inR = null;
-        ByteArrayInputStream byteS = null;
-        GZIPInputStream gzS = null;
-        StringBuilder str = new StringBuilder();
-        try {
-            byteS = new ByteArrayInputStream(bytes);
-            gzS = new GZIPInputStream(byteS);
-            inR = new InputStreamReader(gzS);
-            in = new BufferedReader(inR);
-
-            if (in != null) {
-
-                String content;
-
-                while ((content = in.readLine()) != null) {
-                    str.append(content);
-                }
-            }
-
-        } catch (Exception e) {
-            log.error("Failed get read GZIPInputStream", e);
-        } finally {
-
-            if (byteS != null)
-                try {
-                    byteS.close();
-                } catch (IOException e1) {
-                    log.error("Failed to close ByteStream", e1);
-                }
-            if (gzS != null)
-                try {
-                    gzS.close();
-                } catch (IOException e2) {
-                    log.error("Failed to close GZStream", e2);
-                }
-            if (inR != null)
-                try {
-                    inR.close();
-                } catch (IOException e3) {
-                    log.error("Failed to close InputReader", e3);
-                }
-            if (in != null)
-                try {
-                    in.close();
-                } catch (IOException e) {
-                    log.error("Failed to close BufferedReader", e);
-                }
-        }
-        return str.toString();
-    }
-}
diff --git a/filters/provider/src/main/resources/OSGI-INF/blueprint/filters-blueprint.xml b/filters/provider/src/main/resources/OSGI-INF/blueprint/filters-blueprint.xml
deleted file mode 100644
index 3bf8423..0000000
--- a/filters/provider/src/main/resources/OSGI-INF/blueprint/filters-blueprint.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
-           odl:use-default-for-reference-types="true">
-
-    <bean id="filters" class="org.onap.ccsdk.sli.core.filters.FiltersServiceImpl" />
-    <service ref="filters" interface="org.onap.ccsdk.sli.core.filters.FiltersService" />
-
-</blueprint>
diff --git a/filters/provider/src/main/resources/org/opendaylight/blueprint/filters-blueprint.xml b/filters/provider/src/main/resources/org/opendaylight/blueprint/filters-blueprint.xml
deleted file mode 100644
index 3bf8423..0000000
--- a/filters/provider/src/main/resources/org/opendaylight/blueprint/filters-blueprint.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
-           odl:use-default-for-reference-types="true">
-
-    <bean id="filters" class="org.onap.ccsdk.sli.core.filters.FiltersServiceImpl" />
-    <service ref="filters" interface="org.onap.ccsdk.sli.core.filters.FiltersService" />
-
-</blueprint>
diff --git a/filters/provider/src/test/java/org/onap/ccsdk/sli/core/filters/ControllerAuditLogFilterTest.java b/filters/provider/src/test/java/org/onap/ccsdk/sli/core/filters/ControllerAuditLogFilterTest.java
new file mode 100644
index 0000000..9d0357a
--- /dev/null
+++ b/filters/provider/src/test/java/org/onap/ccsdk/sli/core/filters/ControllerAuditLogFilterTest.java
@@ -0,0 +1,23 @@
+package org.onap.ccsdk.sli.core.filters;
+
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+
+public class ControllerAuditLogFilterTest {
+
+    @Test
+    public void getSimpleSiid() throws Exception {
+        ControllerAuditLogFilter filter = new ControllerAuditLogFilter();
+        String siid = filter.getServiceInstanceId("/restconf/config/Layer3API:services/service-list/100");
+        assertEquals("100", siid);
+    }
+
+    @Test
+    public void getSimpleComplexSiid() throws Exception {
+        ControllerAuditLogFilter filter = new ControllerAuditLogFilter();
+        String siid = filter.getServiceInstanceId(
+                "/restconf/config/Layer3API:services/service-list/1337/service-data/oper-status");
+        assertEquals("1337", siid);
+    }
+
+}
diff --git a/filters/provider/src/test/java/org/onap/ccsdk/sli/core/filters/TestLogFilter.java b/filters/provider/src/test/java/org/onap/ccsdk/sli/core/filters/TestLogFilter.java
deleted file mode 100644
index a900b24..0000000
--- a/filters/provider/src/test/java/org/onap/ccsdk/sli/core/filters/TestLogFilter.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- *
- */
-package org.onap.ccsdk.sli.core.filters;
-
-import static org.junit.Assert.*;
-import org.apache.commons.codec.binary.Base64;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import static org.mockito.Mockito.*;
-import java.io.IOException;
-import java.util.UUID;
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * @author dt5972
- *
- */
-public class TestLogFilter {
-
-    LogFilter logFilter;
-
-    /**
-     * @throws java.lang.Exception
-     */
-    @Before
-    public void setUp() throws Exception {
-        logFilter = new LogFilter();
-        logFilter.init(null);
-    }
-
-    /**
-     * @throws java.lang.Exception
-     */
-    @After
-    public void tearDown() throws Exception {
-        logFilter.destroy();
-    }
-
-    /**
-     * Test method for {@link org.onap.ccsdk.sli.core.filters.LogFilter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)}.
-     * @throws ServletException
-     * @throws IOException
-     */
-    @Test
-    public void testDoFilter() throws IOException, ServletException {
-
-        // Test failed request with minimal headers
-        HttpServletRequest servletReq = mock(HttpServletRequest.class);
-        when(servletReq.getRequestURL()).thenReturn(new StringBuffer("SLI-API:healthcheck"));
-        when(servletReq.getPathInfo()).thenReturn("/hello:world");
-        HttpServletResponse servletResp = mock(HttpServletResponse.class);
-        when(servletResp.getStatus()).thenReturn(400);
-        FilterChain filterChain = mock(FilterChain.class);
-        logFilter.doFilter(servletReq, servletResp, filterChain);
-
-        // Test successful request with valid header
-        when(servletReq.getHeader(LogFilter.REQUEST_ID)).thenReturn(UUID.randomUUID().toString());
-        when(servletReq.getHeader("Authorization")).thenReturn("Basic "+Base64.encodeBase64String("username:password".getBytes()));
-        when(servletResp.getStatus()).thenReturn(200);
-        logFilter.doFilter(servletReq, servletResp, filterChain);
-
-
-    }
-
-}
diff --git a/filters/provider/src/test/java/org/onap/ccsdk/sli/core/filters/TestRequestResponseLoggingFilter.java b/filters/provider/src/test/java/org/onap/ccsdk/sli/core/filters/TestRequestResponseLoggingFilter.java
deleted file mode 100644
index 7ce856e..0000000
--- a/filters/provider/src/test/java/org/onap/ccsdk/sli/core/filters/TestRequestResponseLoggingFilter.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- *
- */
-package org.onap.ccsdk.sli.core.filters;
-
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.*;
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.StringBufferInputStream;
-import java.io.StringReader;
-import java.util.LinkedList;
-import java.util.UUID;
-import java.util.Vector;
-import javax.servlet.FilterChain;
-import javax.servlet.ReadListener;
-import javax.servlet.ServletException;
-import javax.servlet.ServletInputStream;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.WriteListener;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.codec.binary.Base64;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * @author dt5972
- *
- */
-public class TestRequestResponseLoggingFilter {
-
-    RequestResponseLoggingFilter filter;
-
-    private class DummyServletInputStream extends ServletInputStream {
-
-        InputStream stream;
-
-        public DummyServletInputStream(InputStream stream) {
-            this.stream = stream;
-        }
-
-
-        @Override
-        public void close() throws IOException {
-            super.close();
-            stream.close();
-        }
-
-
-        @Override
-        public int read() throws IOException {
-            return stream.read();
-        }
-
-
-		@Override
-		public boolean isFinished() {
-			try {
-				return stream.available() < 1;
-			} catch (IOException e) {
-				return true;
-			}
-		}
-
-
-		@Override
-		public boolean isReady() {
-			// TODO Auto-generated method stub
-			return true;
-		}
-
-
-		@Override
-		public void setReadListener(ReadListener arg0) {
-			// TODO Auto-generated method stub
-			
-		}
-
-
-
-    }
-
-    private class DummyServletOutputStream extends ServletOutputStream {
-
-        OutputStream ostr;
-
-        public DummyServletOutputStream(OutputStream ostr) {
-            this.ostr = ostr;
-        }
-
-        @Override
-        public void write(int b) throws IOException {
-            ostr.write(b);
-        }
-
-		@Override
-		public boolean isReady() {
-			return true;
-		}
-
-		@Override
-		public void setWriteListener(WriteListener arg0) {
-			
-		}
-
-    }
-
-    /**
-     * @throws java.lang.Exception
-     */
-    @Before
-    public void setUp() throws Exception {
-        filter = new RequestResponseLoggingFilter();
-        filter.init(null);
-    }
-
-    /**
-     * @throws java.lang.Exception
-     */
-    @After
-    public void tearDown() throws Exception {}
-
-    /**
-     * Test method for {@link org.onap.ccsdk.sli.core.filters.RequestResponseLoggingFilter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)}.
-     * @throws IOException
-     * @throws ServletException
-     */
-    @Test
-    public void testDoFilter() throws IOException, ServletException {
-
-        HttpServletRequest request = mock(HttpServletRequest.class);
-        String msgBody = "hello world";
-        InputStream reqInputStream = new ByteArrayInputStream(msgBody.getBytes());
-        when(request.getInputStream()).thenReturn(new DummyServletInputStream(reqInputStream));
-        when(request.getMethod()).thenReturn("POST");
-        when(request.getRequestURL()).thenReturn(new StringBuffer("/HELLO:world"));
-        when(request.getPathInfo()).thenReturn("/hello:world");
-        Vector<String> headerList = new Vector<>();
-        headerList.add(LogFilter.REQUEST_ID);
-        headerList.add("Authorization");
-        when(request.getHeaderNames()).thenReturn(headerList.elements());
-
-        when(request.getHeader(LogFilter.REQUEST_ID)).thenReturn(UUID.randomUUID().toString());
-        when(request.getHeader("Authorization")).thenReturn("Basic "+Base64.encodeBase64String("username:password".getBytes()));
-
-        HttpServletResponse response = mock(HttpServletResponse.class);
-        OutputStream outStr = new ByteArrayOutputStream();
-        when(response.getOutputStream()).thenReturn(new DummyServletOutputStream(outStr));
-
-        FilterChain filterChain = mock(FilterChain.class);
-
-        filter.doFilter(request, response, filterChain);
-
-
-
-    }
-
-}
diff --git a/sli/common/pom.xml b/sli/common/pom.xml
index 63967b1..0aad76e 100755
--- a/sli/common/pom.xml
+++ b/sli/common/pom.xml
@@ -73,7 +73,11 @@
             <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
             <artifactId>rfc6991</artifactId>
         </dependency>
-
+            <dependency>
+                <groupId>org.onap.logging-analytics</groupId>
+                <artifactId>logging-slf4j</artifactId>
+                <version>1.5.0</version>
+            </dependency>
         
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
diff --git a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/MetricLogger.java b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/MetricLogger.java
index 30340d4..c2670ec 100755
--- a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/MetricLogger.java
+++ b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/MetricLogger.java
@@ -28,7 +28,7 @@
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.TimeZone;
-
+import org.onap.logging.ref.slf4j.ONAPLogConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
@@ -42,28 +42,13 @@
 public class MetricLogger {
 
     private static final Logger METRIC = LoggerFactory.getLogger("org.onap.ccsdk.sli.core.filters.metric");
-    
-    //TODO use ONAPLogConstants
-    public static final String BEGIN_TIMESTAMP = "InvokeTimestamp";
-    public static final String LOG_TIMESTAMP = "LogTimestamp";
-    public static final String REQUEST_ID = "RequestID";
-    public static final String SERVICE_INSTANCE_ID = "ServiceInstanceID";
-    public static final String TARGET_ENTITY = "TargetEntity";
-    public static final String TARGET_SERVICE_NAME = "TargetServiceName";
-    public static final String STATUS_CODE = "StatusCode";
-    public static final String RESPONSE_CODE = "ResponseCode";
-    public static final String RESPONSE_DESCRIPTION = "ResponseDesc";
-    public static final String INSTANCE_UUID = "InstanceID";
-    public static final String ELAPSED_TIME = "ElapsedTime";
-    public static final String CLIENT_IP = "ClientIPaddress";
-    public static final String TARGET_VIRTUAL_ENTITY = "TargetElement";
     private static final Marker INVOKE_RETURN = MarkerFactory.getMarker("INVOKE-RETURN");
     private static final Marker INVOKE = MarkerFactory.getMarker("INVOKE");
 
     private String lastMsg = null;
 
     public String getRequestID() {
-        return MDC.get(REQUEST_ID);
+        return MDC.get(ONAPLogConstants.MDCs.REQUEST_ID);
     }
     
     public MetricLogger() {
@@ -82,27 +67,29 @@
     }
 
     @Deprecated
-    public void logRequest(String svcInstanceId, String svcName, String partnerName, String targetEntity, String targetServiceName, String targetVirtualEntity, String msg) {
-        logRequest(svcInstanceId,targetEntity,targetServiceName,targetVirtualEntity,msg);
+    public void logRequest(String svcInstanceId, String svcName, String partnerName, String targetEntity,
+            String targetServiceName, String targetElement, String msg) {
+        logRequest(svcInstanceId, targetEntity, targetServiceName, targetElement, msg);
     }
 
-    public void logRequest(String svcInstanceId, String targetEntity, String targetServiceName, String targetVirtualEntity, String msg) {
+    public void logRequest(String svcInstanceId, String targetEntity, String targetServiceName, String targetElement,
+            String msg) {
         long start = System.currentTimeMillis();
-        MDC.put(BEGIN_TIMESTAMP, MetricLogger.asIso8601(start));
+        MDC.put(ONAPLogConstants.MDCs.INVOKE_TIMESTAMP, MetricLogger.asIso8601(start));
 
         if (svcInstanceId != null) {
-            MDC.put(SERVICE_INSTANCE_ID, svcInstanceId);
+            MDC.put(ONAPLogConstants.MDCs.SERVICE_INSTANCE_ID, svcInstanceId);
         }
         if (targetEntity != null) {
-            MDC.put(TARGET_ENTITY, targetEntity);
+            MDC.put(ONAPLogConstants.MDCs.TARGET_ENTITY, targetEntity);
         }
 
         if (targetServiceName != null) {
-            MDC.put(TARGET_SERVICE_NAME, targetServiceName);
+            MDC.put(ONAPLogConstants.MDCs.TARGET_SERVICE_NAME, targetServiceName);
         }
 
-        if (targetVirtualEntity != null) {
-            MDC.put(TARGET_VIRTUAL_ENTITY, targetVirtualEntity);
+        if (targetElement != null) {
+            MDC.put(ONAPLogConstants.MDCs.TARGET_ELEMENT, targetElement);
         }
         this.lastMsg = msg;
         METRIC.info(INVOKE, "Invoke");
@@ -110,20 +97,20 @@
     
     public void logResponse(String statusCode, String responseCode, String responseDescription) {
         long start = System.currentTimeMillis();
-        MDC.put(BEGIN_TIMESTAMP, MetricLogger.asIso8601(start));
+        MDC.put(ONAPLogConstants.MDCs.INVOKE_TIMESTAMP, MetricLogger.asIso8601(start));
 
         if (statusCode != null) {
-            MDC.put(STATUS_CODE, statusCode);
+            MDC.put(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE, statusCode);
         }
         if (responseCode != null) {
-            MDC.put(RESPONSE_CODE, responseCode);
+            MDC.put(ONAPLogConstants.MDCs.RESPONSE_CODE, responseCode);
         }
         if (responseDescription != null) {
-            MDC.put(RESPONSE_DESCRIPTION, formatString(responseDescription));
+            MDC.put(ONAPLogConstants.MDCs.RESPONSE_DESCRIPTION, formatString(responseDescription));
         }
         long end = System.currentTimeMillis();
-        MDC.put(LOG_TIMESTAMP, MetricLogger.asIso8601(end));
-        MDC.put(ELAPSED_TIME, Long.toString(end-start));
+        MDC.put(ONAPLogConstants.MDCs.LOG_TIMESTAMP, MetricLogger.asIso8601(end));
+        MDC.put(ONAPLogConstants.MDCs.ELAPSED_TIME, Long.toString(end - start));
         METRIC.info(INVOKE_RETURN, formatString(lastMsg));
         resetContext();
     }
@@ -137,11 +124,11 @@
     }
 
     public static void resetContext() {
-        MDC.remove(TARGET_ENTITY);
-        MDC.remove(TARGET_SERVICE_NAME);
-        MDC.remove(TARGET_VIRTUAL_ENTITY);
-        MDC.remove(STATUS_CODE);
-        MDC.remove(RESPONSE_CODE);
-        MDC.remove(RESPONSE_DESCRIPTION);
+        MDC.remove(ONAPLogConstants.MDCs.TARGET_ENTITY);
+        MDC.remove(ONAPLogConstants.MDCs.TARGET_SERVICE_NAME);
+        MDC.remove(ONAPLogConstants.MDCs.TARGET_ELEMENT);
+        MDC.remove(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE);
+        MDC.remove(ONAPLogConstants.MDCs.RESPONSE_CODE);
+        MDC.remove(ONAPLogConstants.MDCs.RESPONSE_DESCRIPTION);
     }
 }
diff --git a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImpl.java b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImpl.java
index f563d98..0d49366 100755
--- a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImpl.java
+++ b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImpl.java
@@ -24,7 +24,6 @@
 package org.onap.ccsdk.sli.core.sli.provider;
 
 import java.util.Properties;
-
 import org.onap.ccsdk.sli.core.dblib.DbLibService;
 import org.onap.ccsdk.sli.core.sli.ConfigurationException;
 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
@@ -36,6 +35,7 @@
 import org.onap.ccsdk.sli.core.sli.provider.base.AbstractSvcLogicNodeExecutor;
 import org.onap.ccsdk.sli.core.sli.provider.base.SvcLogicPropertiesProvider;
 import org.onap.ccsdk.sli.core.sli.provider.base.SvcLogicServiceImplBase;
+import org.onap.logging.ref.slf4j.ONAPLogConstants;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
@@ -106,7 +106,8 @@
 
         SvcLogicContext ctx = new SvcLogicContext(props);
         ctx.setAttribute(CURRENT_GRAPH, graph.toString());
-        ctx.setAttribute("X-ECOMP-RequestID", MDC.get("X-ECOMP-RequestID"));
+        // To support legacy code we should not stop populating X-ECOMP-RequestID
+        ctx.setAttribute("X-ECOMP-RequestID", MDC.get(ONAPLogConstants.MDCs.REQUEST_ID));
         ctx.setDomDataBroker(domDataBroker);
         execute(graph, ctx);
         return (ctx.toProperties());
