aboutsummaryrefslogtreecommitdiffstats
path: root/ms
diff options
context:
space:
mode:
Diffstat (limited to 'ms')
-rw-r--r--ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/LoggingWebFilter.kt20
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/filters/RestServerLoggingWebFilter.kt38
2 files changed, 40 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()
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/filters/RestServerLoggingWebFilter.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/filters/RestServerLoggingWebFilter.kt
new file mode 100644
index 000000000..5aaee24de
--- /dev/null
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/filters/RestServerLoggingWebFilter.kt
@@ -0,0 +1,38 @@
+/*
+ * Copyright © 2018-2019 AT&T Intellectual Property.
+ *
+ * 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.onap.ccsdk.cds.blueprintsprocessor.rest.filters
+
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.RestLoggerService
+import org.onap.ccsdk.cds.controllerblueprints.core.MDCContext
+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
+
+
+open class RestServerLoggingWebFilter : 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