Demote some stable logs to Debugw (#1158)

* Demote some stable logs to Debugw

* Add 'discard message from' to ignore list
This commit is contained in:
Raja Subramanian
2022-11-11 10:17:47 +05:30
committed by GitHub
parent e2d775588f
commit fe0502c886
5 changed files with 8 additions and 27 deletions
@@ -39,7 +39,6 @@ type ConnectionStats struct {
lock sync.RWMutex
score float32
lastUpdate time.Time
isLowQuality atomic.Bool
maxExpectedLayer int32
done chan struct{}
@@ -244,15 +243,6 @@ func (cs *ConnectionStats) updateScore(streams map[uint32]*buffer.StreamStatsWit
}
}
if cs.score < 4.2 {
if !cs.isLowQuality.Swap(true) {
// changed from good to low quality, log
cs.params.Logger.Infow("low connection quality", "score", cs.score, "params", params)
}
} else {
cs.isLowQuality.Store(false)
}
return cs.score
}