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:
David Zhao
2023-12-02 15:07:31 -08:00
committed by GitHub
parent beecfe3710
commit 3fe124c87f
24 changed files with 1171 additions and 149 deletions
+8 -4
View File
@@ -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