Skip to content

Commit

Permalink
Improve logging for ConnectionPersistenceActor
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 Aug 16, 2022
1 parent a0c4ed3 commit 6b068fd
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,13 @@ protected void recoveryCompleted(final RecoveryCompleted event) {
@Override
protected ConnectivityEvent<?> modifyEventBeforePersist(final ConnectivityEvent<?> event) {
final ConnectivityEvent<?> superEvent = super.modifyEventBeforePersist(event);
final Set<String> tags = journalTags(event);
final DittoHeaders headersWithJournalTags = superEvent.getDittoHeaders().toBuilder()
.journalTags(journalTags(event))
.journalTags(tags)
.build();
log.withCorrelationId(event)
.info("Appending the following tags to event of type <{}> for connection with ID <{}>: <{}>",
event.getType(), event.getEntityId(), tags);
return superEvent.setDittoHeaders(headersWithJournalTags);
}

Expand Down

0 comments on commit 6b068fd

Please sign in to comment.