Skip to content

Commit

Permalink
squelch observer logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellblazer committed Jun 2, 2024
1 parent deacf1a commit ddb1596
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void gc(Participant member) {
assert member != null;
view.stable(() -> {
if (observers.remove(member.id)) {
log.info("Removed observer: {} view: {} on: {}", member.id, currentView.get(), node.getId());
log.trace("Removed observer: {} view: {} on: {}", member.id, currentView.get(), node.getId());
resetObservers();
}
});
Expand Down Expand Up @@ -607,21 +607,21 @@ private void resetObservers() {
observers.add(node.getId()); // bootstrap case
}
if (observers.size() > 1 && observers.size() < context.getRingCount()) {
log.info("Incomplete observers: {} cardinality: {} view: {} context: {} on: {}", observers.size(),
context.cardinality(), currentView(), context.getId(), node.getId());
log.debug("Incomplete observers: {} cardinality: {} view: {} context: {} on: {}", observers.size(),
context.cardinality(), currentView(), context.getId(), node.getId());
assert observers.size() > 1 && observers.size() < context.getRingCount();
}
log.info("Reset observers: {} cardinality: {} view: {} context: {} on: {}", observers.size(),
context.cardinality(), currentView(), context.getId(), node.getId());
log.trace("Reset observers: {} cardinality: {} view: {} context: {} on: {}", observers.size(),
context.cardinality(), currentView(), context.getId(), node.getId());
}

private void setDiadem(final HexBloom hex) {
diadem.set(hex);
currentView.set(diadem.get().compactWrapped());
resetObservers();
log.info("View: {} set diadem: {} observers: {} view: {} context: {} size: {} on: {}", context.getId(),
diadem.get().compactWrapped(), observers.stream().toList(), currentView(), context.getId(),
context.size(), node.getId());
log.debug("View: {} set diadem: {} observers: {} view: {} context: {} size: {} on: {}", context.getId(),
diadem.get().compactWrapped(), observers.stream().toList(), currentView(), context.getId(),
context.size(), node.getId());
}

record Ballot(Digest view, List<Digest> leaving, List<Digest> joining, int hash) {
Expand Down

0 comments on commit ddb1596

Please sign in to comment.