chore: remove error stacktrace from peer disconnected during identify protocol logs (#8289)

**Motivation**

This log is way too verbose on devnet-3 right now
```
devops@lodestar-reth-1 ➜  ~ docker logs beacon 2>&1 | grep "Peer disconnected during identify protocol" | wc -l
113256
```

As suggested in
https://github.com/ChainSafe/lodestar/pull/8188#discussion_r2269948281
we should observe the error for a bit and it seems to be only
`unexpected end of input` which is not very useful.

**Description**


Remove error stacktrace from peer disconnected during identify protocol
logs

~~Alternative could be to add message to context or concat to the
message, open to any of these if we still think including the error
message is valuable.~~ went with still printing out the error message
This commit is contained in:
Nico Flaig
2025-08-28 20:29:50 +01:00
committed by GitHub
parent c9507c76b2
commit eb311a59bd

View File

@@ -751,7 +751,10 @@ export class PeerManager {
})
.catch((err) => {
if (evt.detail.status !== "open") {
this.logger.debug("Peer disconnected during identify protocol", {peerId: remotePeerPrettyStr}, err);
this.logger.debug("Peer disconnected during identify protocol", {
peerId: remotePeerPrettyStr,
error: (err as Error).message,
});
} else {
this.logger.debug("Error setting agentVersion for the peer", {peerId: remotePeerPrettyStr}, err);
}