Commit 23390546 authored by Georg Mittendorfer's avatar Georg Mittendorfer

Make health check logging less verbose.

parent 8313afb5
......@@ -201,8 +201,7 @@ public class IriNode implements Node {
this.info.setLatestMilestoneIndex(NodeInfo.INVALID_MILESTONE);
this.info.setLatestSolidSubtangleMilestoneIndex(NodeInfo.INVALID_MILESTONE);
if (isAvailable() || logger.isDebugEnabled()) {
setUnavailable("not available");
logger.info("Health check failed for node [{}]: {}", name, message);
setUnavailable(message);
}
return this.info;
}
......@@ -241,7 +240,7 @@ public class IriNode implements Node {
}
protected void setAvailable() {
logger.info("Setting node [{}/{}] available. Reason: [{}].", name, url, "available");
logger.info("Setting node [{}/{}] available.", name, url);
this.available = true;
}
......
......@@ -215,8 +215,8 @@ public class NodeRegistry {
}
private void logNodeHealthSummary(Map<String, IriNode> nodes) {
Object[] inactive = nodes.values().stream().filter(node -> !node.isAvailable()).toArray();
logger.info("Active nodes: [{}]. Inactive nodes: [{}] => {}", nodes.values().size() - inactive.length, inactive.length, inactive);
List<IriNode> inactive = nodes.values().stream().filter(node -> !node.isAvailable()).collect(Collectors.toList());
logger.info("Active nodes: [{}]. Inactive nodes: [{}] => [{}]", nodes.values().size() - inactive.size(), inactive.size(), inactive.stream().map(IriNode::getName).collect(Collectors.joining(", ")));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment