From 4ea6f5a40d5c5143d07ab4c59a37e4b09bd06cc2 Mon Sep 17 00:00:00 2001 From: Brinda Santh Date: Fri, 1 Nov 2019 09:58:00 -0400 Subject: Refractor rest log tracing filter for reuse. Issue-ID: CCSDK-1046 Signed-off-by: Brinda Santh Change-Id: I0ef0627851041b80f63c907c165c9eff5972a973 --- .../cds/blueprintsprocessor/LoggingWebFilter.kt | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'ms/blueprintsprocessor/application/src') diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/LoggingWebFilter.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/LoggingWebFilter.kt index 68fbf256c..236c8d7f6 100644 --- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/LoggingWebFilter.kt +++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/LoggingWebFilter.kt @@ -16,24 +16,8 @@ package org.onap.ccsdk.cds.blueprintsprocessor -import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.RestLoggerService -import org.onap.ccsdk.cds.controllerblueprints.core.MDCContext +import org.onap.ccsdk.cds.blueprintsprocessor.rest.filters.RestServerLoggingWebFilter import org.springframework.stereotype.Component -import org.springframework.web.server.ServerWebExchange -import org.springframework.web.server.WebFilter -import org.springframework.web.server.WebFilterChain -import reactor.core.publisher.Mono -import reactor.util.context.Context @Component -open class LoggingWebFilter : WebFilter { - override fun filter(serverWebExchange: ServerWebExchange, webFilterChain: WebFilterChain): Mono { - - val loggingService = RestLoggerService() - loggingService.entering(serverWebExchange.request) - val filterChain = webFilterChain.filter(serverWebExchange).subscriberContext( - Context.of(MDCContext, MDCContext())) - loggingService.exiting(serverWebExchange.request, serverWebExchange.response) - return filterChain - } -} \ No newline at end of file +open class LoggingWebFilter : RestServerLoggingWebFilter() -- cgit 1.2.3-korg