Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log bootnodes and static nodes list at debug level #6273

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -2120,8 +2120,6 @@ private void configure() throws Exception {
instantiateSignatureAlgorithmFactory();

logger.info(generateConfigurationOverview());
logger.info("Connecting to {} static nodes.", staticNodes.size());
logger.trace("Static Nodes = {}", staticNodes);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note moving the log from here to where the configuration is happening highlights that the updateNetworkConfig() method is called twice. Not sure if that is intentional

logger.info("Security Module: {}", securityModuleName);
}

Expand Down Expand Up @@ -3119,9 +3117,14 @@ private EthNetworkConfig updateNetworkConfig(final NetworkName network) {
if (listBootNodes != null) {
if (!p2PDiscoveryOptionGroup.peerDiscoveryEnabled) {
logger.warn("Discovery disabled: bootnodes will be ignored.");
} else {
logger.info("Configured {} bootnodes.", listBootNodes.size());
logger.debug("Bootnodes = {}", listBootNodes);
}
DiscoveryConfiguration.assertValidBootnodes(listBootNodes);
builder.setBootNodes(listBootNodes);
} else {
logger.info("0 Bootnodes configured");
}
return builder.build();
}
Expand Down Expand Up @@ -3224,7 +3227,11 @@ private Set<EnodeURL> loadStaticNodes() throws IOException {
staticNodesPath = dataDir().resolve(staticNodesFilename);
}
logger.debug("Static Nodes file: {}", staticNodesPath);
return StaticNodesParser.fromPath(staticNodesPath, getEnodeDnsConfiguration());
final Set<EnodeURL> staticNodes =
StaticNodesParser.fromPath(staticNodesPath, getEnodeDnsConfiguration());
logger.info("Connecting to {} static nodes.", staticNodes.size());
logger.debug("Static Nodes = {}", staticNodes);
return staticNodes;
}

private List<EnodeURL> buildEnodes(
Expand Down
Loading