Skip to content

Commit

Permalink
minor logging fix: parameter "collectionName" was missing in debug ou…
Browse files Browse the repository at this point in the history
…tput

Signed-off-by: Daniel Fesenmeyer <daniel.fesenmeyer@bosch-si.com>
  • Loading branch information
danielFesenmeyer authored and thjaeckle committed Feb 14, 2018
1 parent dcb9351 commit 861cab6
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -104,7 +104,7 @@ public Source<NotUsed, NotUsed> updateLastSuccessfulStreamEnd(final Instant time

return Source.fromPublisher(lastSuccessfulSearchSyncCollection.insertOne(toStore))
.map(success -> {
LOGGER.debug("Successfully inserted timestamp for search synchronization: <{}>", timestamp);
LOGGER.debug("Successfully inserted timestamp for search synchronization: <{}>.", timestamp);
return NotUsed.getInstance();
});
}
Expand All @@ -126,7 +126,7 @@ private Source<Instant, NotUsed> retrieveLastSuccessfulStreamEndAsync(final Inst
.flatMapConcat(doc -> {
final Date date = doc.getDate(FIELD_TIMESTAMP);
final Instant timestamp = date.toInstant();
LOGGER.debug("Returning last timestamp of search synchronization: <{}>", timestamp);
LOGGER.debug("Returning last timestamp of search synchronization: <{}>.", timestamp);
return Source.single(timestamp);
})
.orElse(Source.single(defaultTimestamp));
Expand Down Expand Up @@ -172,12 +172,12 @@ private static void createCappedCollectionIfItDoesNotExist(
final Source<Success, NotUsed> source = Source.fromPublisher(publisher);
final CompletionStage<Success> done = source.runWith(Sink.head(), materializer);
done.toCompletableFuture().get(createTimeoutSeconds, TimeUnit.SECONDS);
LOGGER.debug("Successfully created collection: {}");
LOGGER.debug("Successfully created collection: <{}>.", collectionName);
} catch (final InterruptedException | TimeoutException e) {
throw new IllegalStateException(e);
} catch (final ExecutionException e) {
if (isCollectionAlreadyExistsError(e.getCause())) {
LOGGER.debug("Collection already exists: {}");
LOGGER.debug("Collection already exists: <{}>.", collectionName);
} else {
throw new IllegalStateException(e);
}
Expand Down

0 comments on commit 861cab6

Please sign in to comment.