Log cleanup pass (#2285)
* Log cleanup pass Demoted a bunch of logs to DEBUG, consolidated logs. * use context logger and fix context var usage * moved common error types, fixed tests
This commit is contained in:
@@ -350,7 +350,10 @@ func (b *Buffer) Close() error {
|
||||
|
||||
if b.rtpStats != nil {
|
||||
b.rtpStats.Stop()
|
||||
b.logger.Infow("rtp stats", "direction", "upstream", "stats", b.rtpStats.ToString())
|
||||
b.logger.Debugw("rtp stats",
|
||||
"direction", "upstream",
|
||||
"stats", func() interface{} { return b.rtpStats.ToString() },
|
||||
)
|
||||
if b.onFinalRtpStats != nil {
|
||||
b.onFinalRtpStats(b.rtpStats.ToProto())
|
||||
}
|
||||
|
||||
@@ -984,10 +984,14 @@ func (d *DownTrack) CloseWithFlush(flush bool) {
|
||||
d.bindLock.Unlock()
|
||||
d.connectionStats.Close()
|
||||
d.rtpStats.Stop()
|
||||
rtpStats := d.rtpStats.ToString()
|
||||
if rtpStats != "" {
|
||||
d.params.Logger.Infow("rtp stats", "direction", "downstream", "mime", d.mime, "ssrc", d.ssrc, "stats", rtpStats)
|
||||
}
|
||||
d.params.Logger.Debugw("rtp stats",
|
||||
"direction", "downstream",
|
||||
"mime", d.mime,
|
||||
"ssrc", d.ssrc,
|
||||
// evaluate only if log level matches
|
||||
"stats", func() interface{} {
|
||||
return d.rtpStats.ToString()
|
||||
})
|
||||
|
||||
d.maxLayerNotifierChMu.Lock()
|
||||
d.maxLayerNotifierChClosed = true
|
||||
|
||||
@@ -1297,7 +1297,7 @@ func (s *StreamAllocator) initProbe(probeGoalDeltaBps int64) {
|
||||
s.channelObserver = s.newChannelObserverProbe()
|
||||
s.channelObserver.SeedEstimate(s.lastReceivedEstimate)
|
||||
|
||||
s.params.Logger.Infow(
|
||||
s.params.Logger.Debugw(
|
||||
"stream allocator: starting probe",
|
||||
"probeClusterId", probeClusterId,
|
||||
"current usage", expectedBandwidthUsage,
|
||||
|
||||
Reference in New Issue
Block a user