Skip to content

Commit

Permalink
Fix logging in kafka message transformer
Browse files Browse the repository at this point in the history
Signed-off-by: Yannic Klem <yannic.klem@bosch.io>
  • Loading branch information
Yannic92 committed Jul 19, 2021
1 parent 6893964 commit 1eb607d
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -80,11 +80,10 @@ public Either<ExternalMessage, DittoRuntimeException> transform(
.getOrDefault(DittoHeaderDefinition.CORRELATION_ID.getKey(), UUID.randomUUID().toString());
try {
final DittoLogger correlationIdScopedLogger = LOGGER.withCorrelationId(correlationId);
if (correlationIdScopedLogger.isDebugEnabled()) {
correlationIdScopedLogger.debug(
"Transforming incoming kafka message <{}> with headers <{}> for thing with ID <{}>.",
value, messageHeaders, key);
}
correlationIdScopedLogger.debug(
"Transforming incoming kafka message <{}> with headers <{}> and key <{}>.",
value, messageHeaders, key
);

final ExternalMessage externalMessage = ExternalMessageFactory.newExternalMessageBuilder(messageHeaders)
.withTextAndBytes(value, value == null ? null : value.getBytes())
Expand Down

0 comments on commit 1eb607d

Please sign in to comment.