From 8c1f684e2bd0708c8685b10aba424c2f49329133 Mon Sep 17 00:00:00 2001 From: Gabriel-Trintinalia Date: Mon, 8 Jan 2024 12:58:05 +1100 Subject: [PATCH] Move logging to RunnerBuilder Signed-off-by: Gabriel-Trintinalia --- besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java | 2 ++ .../src/main/java/org/hyperledger/besu/cli/BesuCommand.java | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java b/besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java index d75d119cdea..bb3172b7dee 100644 --- a/besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java +++ b/besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java @@ -608,6 +608,8 @@ public Runner build() { bootstrap = ethNetworkConfig.getBootNodes(); } discoveryConfiguration.setBootnodes(bootstrap); + LOG.info("Resolved {} bootnodes.", bootstrap.size()); + LOG.debug("Bootnodes = {}", bootstrap); discoveryConfiguration.setDnsDiscoveryURL(ethNetworkConfig.getDnsDiscoveryUrl()); discoveryConfiguration.setDiscoveryV5Enabled( networkingConfiguration.getDiscovery().isDiscoveryV5Enabled()); diff --git a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java index 9560477eda2..d223ff989c9 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java @@ -1437,7 +1437,6 @@ public void run() { if (network != null && network.isDeprecated()) { logger.warn(NetworkDeprecationMessage.generate(network)); } - try { configureLogging(true); @@ -3120,14 +3119,9 @@ 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(); }