From 07bbbf71cd65b29f446a1b475add87f20365db83 Mon Sep 17 00:00:00 2001 From: Piotr Jaszczyk Date: Thu, 7 Jun 2018 11:52:16 +0200 Subject: Fix TCP stream framing issue Because of the nature of TCP protocol we receive consecutive IO buffer snapshots - not separate messages. That means that we need to join incomming buffers and then split it into separate WireFrames. Closes ONAP-312 Change-Id: I84ba0ec58a41ff9026f2fca24d2b15f3adcf0a19 Signed-off-by: Piotr Jaszczyk Issue-ID: DCAEGEN2-601 --- .../org/onap/dcae/collectors/veshv/utils/logging/Logger.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'hv-collector-utils') diff --git a/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/logging/Logger.kt b/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/logging/Logger.kt index b96a8b3a..eb52a866 100644 --- a/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/logging/Logger.kt +++ b/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/logging/Logger.kt @@ -25,6 +25,17 @@ import kotlin.reflect.KClass class Logger(val logger: org.slf4j.Logger) { constructor(clazz: KClass) : this(LoggerFactory.getLogger(clazz.java)) + // + // TRACE + // + + fun trace(messageProvider: () -> String) { + if (logger.isTraceEnabled) { + logger.trace(messageProvider()) + } + } + + // // DEBUG // -- cgit 1.2.3-korg