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

chore: reduce log noise at default level (#4824) #4825

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions pkg/api/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ func (s *Service) transactionResendHandler(w http.ResponseWriter, r *http.Reques

err := s.transaction.ResendTransaction(r.Context(), paths.Hash)
if err != nil {
logger.Debug("resend transaction failed", "tx_hash", paths.Hash, "error", err)
logger.Error(nil, "resend transaction failed", "tx_hash", paths.Hash)
logger.Error(nil, "resend transaction failed", "tx_hash", paths.Hash, "error", err)
if errors.Is(err, transaction.ErrUnknownTransaction) {
jsonhttp.NotFound(w, errUnknownTransaction)
} else if errors.Is(err, transaction.ErrAlreadyImported) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/postage/listener/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func (l *listener) Listen(ctx context.Context, from uint64, updater postage.Even
events, err := l.ev.FilterLogs(ctx, l.filterQuery(big.NewInt(int64(from)), big.NewInt(int64(to))))
if err != nil {
l.metrics.BackendErrors.Inc()
l.logger.Warning("could not get logs", "error", err)
l.logger.Warning("could not get blockchain log", "error", err)
lastConfirmedBlock = 0
continue
}
Expand Down
6 changes: 2 additions & 4 deletions pkg/topology/kademlia/kademlia.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,11 +440,9 @@ func (k *Kad) connectionAttemptsHandler(ctx context.Context, wg *sync.WaitGroup,
return
case errors.Is(err, p2p.ErrPeerBlocklisted):
k.logger.Debug("peer still in blocklist", "peer_address", bzzAddr)
k.logger.Warning("peer still in blocklist")
return
case err != nil:
k.logger.Debug("peer not reachable from kademlia", "peer_address", bzzAddr, "error", err)
k.logger.Warning("peer not reachable when attempting to connect")
return
}

Expand All @@ -457,7 +455,7 @@ func (k *Kad) connectionAttemptsHandler(ctx context.Context, wg *sync.WaitGroup,

k.recalcDepth()

k.logger.Info("connected to peer", "peer_address", peer.addr, "proximity_order", peer.po)
k.logger.Debug("connected to peer", "peer_address", peer.addr, "proximity_order", peer.po)
k.notifyManageLoop()
k.notifyPeerSig()
}
Expand Down Expand Up @@ -1218,7 +1216,7 @@ func (k *Kad) onConnected(ctx context.Context, addr swarm.Address) error {

// Disconnected is called when peer disconnects.
func (k *Kad) Disconnected(peer p2p.Peer) {
k.logger.Info("disconnected peer", "peer_address", peer.Address)
k.logger.Debug("disconnected peer", "peer_address", peer.Address)

k.connectedPeers.Remove(peer.Address)

Expand Down
Loading