Sho SHIMIZU
Committed by Gerrit Code Review

Add logging in ConsistentResourceStore

Change-Id: I8ce8236669c149f2ee810c5ff2c71591fa5a843c
......@@ -180,11 +180,14 @@ public class ConsistentResourceStore extends AbstractStore<ResourceEvent, Resour
boolean success = tx.commit();
if (success) {
log.trace("Transaction commit succeeded on registration: resources={}", resources);
List<ResourceEvent> events = resources.stream()
.filter(x -> x.parent().isPresent())
.map(x -> new ResourceEvent(RESOURCE_ADDED, x))
.collect(Collectors.toList());
notifyDelegate(events);
} else {
log.debug("Transaction commit failed on registration: resources={}", resources);
}
return success;
}
......