summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/application
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-11-07 15:00:00 +0000
committerGerrit Code Review <gerrit@onap.org>2019-11-07 15:00:00 +0000
commit043b76ce214017bdc97e15600c1d17b10f60916a (patch)
treed884fc58a7739b89eab7b97022384d1f6ec661b4 /ms/blueprintsprocessor/application
parentdd785b270c9215297ca9c498a966c5f84e883bbe (diff)
parent4ea6f5a40d5c5143d07ab4c59a37e4b09bd06cc2 (diff)
Merge "Refractor rest log tracing filter for reuse."
Diffstat (limited to 'ms/blueprintsprocessor/application')
-rw-r--r--ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/LoggingWebFilter.kt20
1 files changed, 2 insertions, 18 deletions
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<Void> {
-
- 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()