Reduce Log Noise (#261)

Some more logging level downgrades.
* At steady state we should get only one info level log per new block
* We don't need to know about peer stuff at info
* Caught up to best peer fires for every block
Danno Ferrin 6 years ago committed by GitHub
parent 22177b12c8
commit 22ed03518d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/Downloader.java
  2. 4
      ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/GetBlockFromPeerTask.java
  3. 4
      ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/WaitForPeerTask.java

@ -151,7 +151,7 @@ public class Downloader<C> {
if (peerTd.compareTo(syncState.chainHeadTotalDifficulty()) <= 0
&& peerHeight <= syncState.chainHeadNumber()) {
// We're caught up to our best peer, try again when a new peer connects
LOG.info("Caught up to best peer: " + bestPeer.chainState().getEstimatedHeight());
LOG.debug("Caught up to best peer: " + bestPeer.chainState().getEstimatedHeight());
return waitForPeerAndThenSetSyncTarget();
}
return DetermineCommonAncestorTask.create(

@ -49,7 +49,7 @@ public class GetBlockFromPeerTask extends AbstractPeerTask<Block> {
@Override
protected void executeTaskWithPeer(final EthPeer peer) throws PeerNotConnected {
LOG.info("Downloading block {} from peer {}.", hash, peer);
LOG.debug("Downloading block {} from peer {}.", hash, peer);
downloadHeader(peer)
.thenCompose(this::completeBlock)
.whenComplete(
@ -61,7 +61,7 @@ public class GetBlockFromPeerTask extends AbstractPeerTask<Block> {
LOG.info("Failed to download block {} from peer {}.", hash, peer);
result.get().completeExceptionally(new IncompleteResultsException());
} else {
LOG.info("Successfully downloaded block {} from peer {}.", hash, peer);
LOG.debug("Successfully downloaded block {} from peer {}.", hash, peer);
result.get().complete(new PeerTaskResult<>(r.getPeer(), r.getResult().get(0)));
}
});

@ -37,7 +37,7 @@ public class WaitForPeerTask extends AbstractEthTask<Void> {
@Override
protected void executeTask() {
final EthPeers ethPeers = ethContext.getEthPeers();
LOG.info(
LOG.debug(
"Waiting for new peer connection. {} peers currently connected, {} idle.",
ethPeers.peerCount(),
ethPeers.idlePeer().isPresent() ? "Some peers" : "No peers");
@ -45,7 +45,7 @@ public class WaitForPeerTask extends AbstractEthTask<Void> {
peerListenerId =
ethPeers.subscribeConnect(
(peer) -> {
LOG.info("Finished waiting for peer connection.");
LOG.debug("Finished waiting for peer connection.");
// We hit our target
result.get().complete(null);
});

Loading…
Cancel
Save