From 82d7dbd9d08c77b0fecf1b47393d50d81760e758 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Fri, 11 Jan 2019 20:57:10 -0500 Subject: updated logging to JaxRsFilterLogging Changed the MDC sourcing from LoggingInterceptor to JaxRsFilterLogging. Change-Id: Idd807f1bf6d3a5a680f547d09503a53a362cd5d1 Issue-ID: SO-1362 Signed-off-by: Benjamin, Max (mb388a) --- .../src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap') diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java index 676dca101b..8c00eb06b4 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java @@ -62,6 +62,7 @@ import org.onap.so.db.catalog.client.CatalogDbClient; import org.onap.so.db.request.beans.InfraActiveRequests; import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.exceptions.ValidationException; +import org.onap.so.logger.LogConstants; import org.onap.so.logger.MessageEnum; import org.onap.so.logger.MsoLogger; import org.onap.so.serviceinstancebeans.CloudConfiguration; @@ -79,6 +80,7 @@ import org.onap.so.serviceinstancebeans.ServiceInstancesResponse; import org.onap.so.serviceinstancebeans.VfModules; import org.onap.so.serviceinstancebeans.Vnfs; import org.onap.so.utils.UUIDChecker; +import org.slf4j.MDC; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.env.Environment; import org.springframework.stereotype.Component; @@ -666,6 +668,8 @@ public class ServiceInstances { public String getRequestUri(ContainerRequestContext context){ String requestUri = context.getUriInfo().getPath(); + String httpUrl = MDC.get(LogConstants.URI_BASE).concat(requestUri); + MDC.put(LogConstants.HTTP_URL, httpUrl); requestUri = requestUri.substring(requestUri.indexOf("/serviceInstantiation/") + 22); return requestUri; } -- cgit 1.2.3-korg