aboutsummaryrefslogtreecommitdiffstats
path: root/sources/hv-collector-ves-message-generator
diff options
context:
space:
mode:
authorkjaniak <kornel.janiak@nokia.com>2018-11-29 13:44:50 +0100
committerkjaniak <kornel.janiak@nokia.com>2018-12-05 14:53:20 +0100
commit0f7bc6b6ec219b6e22a4b5b5a4ee1efd4e54efba (patch)
tree593dc7b9487d148160110be532e038f8a383846b /sources/hv-collector-ves-message-generator
parentd632aef8303701a1802f817c3d6fdcd4064c32b2 (diff)
Enhance of logging in test part
Change-Id: Ibdec0ac5cead7e46ada4c32983b9ccf962df703b Issue-ID: DCAEGEN2-1004 Signed-off-by: kjaniak <kornel.janiak@nokia.com>
Diffstat (limited to 'sources/hv-collector-ves-message-generator')
-rw-r--r--sources/hv-collector-ves-message-generator/pom.xml10
-rw-r--r--sources/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageParametersParserImpl.kt7
2 files changed, 12 insertions, 5 deletions
diff --git a/sources/hv-collector-ves-message-generator/pom.xml b/sources/hv-collector-ves-message-generator/pom.xml
index c5ce7f65..29e32f46 100644
--- a/sources/hv-collector-ves-message-generator/pom.xml
+++ b/sources/hv-collector-ves-message-generator/pom.xml
@@ -64,6 +64,11 @@
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
+ <artifactId>hv-collector-utils</artifactId>
+ <version>${project.parent.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.parent.groupId}</groupId>
<artifactId>hv-collector-test-utils</artifactId>
<version>${project.parent.version}</version>
<scope>test</scope>
@@ -101,11 +106,6 @@
<artifactId>reactor-test</artifactId>
</dependency>
<dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <scope>runtime</scope>
- </dependency>
- <dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
</dependency>
diff --git a/sources/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageParametersParserImpl.kt b/sources/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageParametersParserImpl.kt
index 6ef6d53a..88cc47a6 100644
--- a/sources/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageParametersParserImpl.kt
+++ b/sources/hv-collector-ves-message-generator/src/main/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageParametersParserImpl.kt
@@ -22,6 +22,7 @@ package org.onap.dcae.collectors.veshv.ves.message.generator.impl
import arrow.core.Option
import arrow.core.Try
import arrow.core.identity
+import org.onap.dcae.collectors.veshv.utils.logging.Logger
import org.onap.dcae.collectors.veshv.ves.message.generator.api.MessageParameters
import org.onap.dcae.collectors.veshv.ves.message.generator.api.MessageParametersParser
import org.onap.dcae.collectors.veshv.ves.message.generator.api.MessageType
@@ -40,6 +41,7 @@ internal class MessageParametersParserImpl(
Try {
request
.map { it.asJsonObject() }
+ .onEach { logger.info { "Parsing MessageParameters body: $it" } }
.map { json ->
val commonEventHeader = commonEventHeaderParser
.parse(json.getJsonObject("commonEventHeader"))
@@ -54,4 +56,9 @@ internal class MessageParametersParserImpl(
ex.message ?: "Unable to parse message parameters",
Option.fromNullable(ex))
}
+
+ companion object {
+ private val logger = Logger(MessageParametersParserImpl::class)
+ }
+
}