Logging cleanup (#843)
* Logging cleanup Changes log levels to better match significance * fix lock
This commit is contained in:
@@ -288,7 +288,7 @@ func (b *Buffer) Close() error {
|
||||
|
||||
if b.rtpStats != nil {
|
||||
b.rtpStats.Stop()
|
||||
b.logger.Infow("rtp stats", "stats", b.rtpStats.ToString())
|
||||
b.logger.Infow("rtp stats", "direction", "upstream", "stats", b.rtpStats.ToString())
|
||||
}
|
||||
|
||||
if b.onClose != nil {
|
||||
|
||||
@@ -19,7 +19,7 @@ type DependencyDescriptorParser struct {
|
||||
}
|
||||
|
||||
func NewDependencyDescriptorParser(ddExt uint8, logger logger.Logger, onMaxLayerChanged func(int32, int32)) *DependencyDescriptorParser {
|
||||
logger.Infow("creating dependency descriptor parse", "ddExt", ddExt)
|
||||
logger.Infow("creating dependency descriptor parser", "ddExt", ddExt)
|
||||
return &DependencyDescriptorParser{
|
||||
ddExt: ddExt,
|
||||
logger: logger,
|
||||
|
||||
@@ -165,7 +165,7 @@ func (cs *ConnectionStats) updateScore(streams map[uint32]*buffer.StreamStatsWit
|
||||
}
|
||||
|
||||
if cs.score < 4.0 {
|
||||
cs.params.Logger.Infow("low score", "score", cs.score, "params", params)
|
||||
cs.params.Logger.Debugw("low connection quality score", "score", cs.score, "params", params)
|
||||
}
|
||||
|
||||
return cs.score
|
||||
|
||||
@@ -308,7 +308,7 @@ func (d *DownTrack) Bind(t webrtc.TrackLocalContext) (webrtc.RTPCodecParameters,
|
||||
|
||||
d.connectionStats.SetTrackSource(d.receiver.TrackSource())
|
||||
d.connectionStats.Start()
|
||||
d.logger.Debugw("bound")
|
||||
d.logger.Debugw("downtrack bound")
|
||||
|
||||
return codec, nil
|
||||
}
|
||||
@@ -685,7 +685,7 @@ func (d *DownTrack) CloseWithFlush(flush bool) {
|
||||
d.bindLock.Unlock()
|
||||
d.connectionStats.Close()
|
||||
d.rtpStats.Stop()
|
||||
d.logger.Infow("rtp stats", "stats", d.rtpStats.ToString())
|
||||
d.logger.Infow("rtp stats", "direction", "downstream", "stats", d.rtpStats.ToString())
|
||||
|
||||
if d.onMaxLayerChanged != nil && d.kind == webrtc.RTPCodecTypeVideo {
|
||||
d.onMaxLayerChanged(d, InvalidLayerSpatial)
|
||||
@@ -1347,7 +1347,7 @@ func (d *DownTrack) getTranslatedRTPHeader(extPkt *buffer.ExtPacket, tp *Transla
|
||||
if d.dependencyDescriptorID != 0 && tp.ddExtension != nil {
|
||||
bytes, err := tp.ddExtension.Marshal()
|
||||
if err != nil {
|
||||
d.logger.Infow("marshalling dependency descriptor extension err", "err", err)
|
||||
d.logger.Warnw("error marshalling dependency descriptor extension", err)
|
||||
} else {
|
||||
extension = append(extension, extensionData{
|
||||
id: uint8(d.dependencyDescriptorID),
|
||||
|
||||
@@ -526,7 +526,7 @@ func (f *Forwarder) AllocateOptimal(brs Bitrates) VideoAllocation {
|
||||
if bandwidthRequested == 0 && f.maxLayers.IsValid() {
|
||||
// if we cannot allocate anything below max layer,
|
||||
// look for a layer above. It is okay to overshoot
|
||||
// in optimal allocation (i. e. no bandwidth restricstions).
|
||||
// in optimal allocation (i.e. no bandwidth restrictions).
|
||||
// It is possible that clients send only a higher layer.
|
||||
// To accommodate cases like that, try finding a layer
|
||||
// above the requested maximum to ensure streaming
|
||||
|
||||
Reference in New Issue
Block a user