improve logging

This commit is contained in:
aarshkshah1992
2026-01-07 15:19:51 +05:30
parent 3e7cd8c2f1
commit 04d45b6194
3 changed files with 5 additions and 5 deletions

View File

@@ -14,8 +14,8 @@ import (
)
const dialInterval = 500 * time.Millisecond
const peerCountLogInterval = 1 * time.Minute
const topicMonitorInterval = 1 * time.Second
const peerCountLogInterval = 5 * time.Minute
const topicMonitorInterval = 200 * time.Millisecond
// GossipPeerDialer maintains minimum peer counts for gossip topics by periodically
// dialing new peers discovered by a crawler. It runs a background loop that checks each
@@ -121,7 +121,7 @@ func (g *GossipPeerDialer) logPeerCountsLoop() {
log.WithField("topic", topic).
WithField("currentPeers", currentPeers).
WithField("minPeers", minPeers).
Info("Gossip topic peer count")
Debug("Gossip topic peer count")
}
case <-g.ctx.Done():

View File

@@ -171,7 +171,7 @@ func (cp *crawledPeers) logPeerCounts() {
log.WithField("topic", topic).
WithField("totalPeers", len(peers)).
WithField("pingedPeers", pingedCount).
Info("Crawler indexed peers for topic")
Debug("Crawler indexed peers for topic")
}
}

View File

@@ -64,7 +64,7 @@ var (
// defined below.
pollingPeriod = 6 * time.Second
crawlTimeout = 30 * time.Second
crawlTimeout = 5 * time.Second
crawlInterval = 1 * time.Second
maxConcurrentDials = int64(256)
)