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:
@@ -17,6 +17,7 @@ var (
|
|||||||
"pingAllCandidates called with no candidate pairs",
|
"pingAllCandidates called with no candidate pairs",
|
||||||
"failed to send packet",
|
"failed to send packet",
|
||||||
"Ignoring remote candidate with tcpType active",
|
"Ignoring remote candidate with tcpType active",
|
||||||
|
"discard message from",
|
||||||
},
|
},
|
||||||
"pc": {
|
"pc": {
|
||||||
"Failed to accept RTCP stream is already closed",
|
"Failed to accept RTCP stream is already closed",
|
||||||
|
|||||||
+1
-12
@@ -766,20 +766,9 @@ func (p *ParticipantImpl) GetConnectionQuality() *livekit.ConnectionQualityInfo
|
|||||||
avgScore = totalScore / float32(numTracks)
|
avgScore = totalScore / float32(numTracks)
|
||||||
}
|
}
|
||||||
|
|
||||||
if avgScore < 4.5 {
|
|
||||||
p.params.Logger.Infow(
|
|
||||||
"low connection quality score",
|
|
||||||
"avgScore", avgScore,
|
|
||||||
"publisherScores", publisherScores,
|
|
||||||
"subscriberScores", subscriberScores,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
rating := connectionquality.Score2Rating(avgScore)
|
|
||||||
|
|
||||||
return &livekit.ConnectionQualityInfo{
|
return &livekit.ConnectionQualityInfo{
|
||||||
ParticipantSid: string(p.ID()),
|
ParticipantSid: string(p.ID()),
|
||||||
Quality: rating,
|
Quality: connectionquality.Score2Rating(avgScore),
|
||||||
Score: avgScore,
|
Score: avgScore,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -435,7 +435,7 @@ func (t *PCTransport) setConnectedAt(at time.Time) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *PCTransport) onICEGatheringStateChange(state webrtc.ICEGathererState) {
|
func (t *PCTransport) onICEGatheringStateChange(state webrtc.ICEGathererState) {
|
||||||
t.params.Logger.Infow("ice gathering state change", "state", state.String())
|
t.params.Logger.Debugw("ice gathering state change", "state", state.String())
|
||||||
if state != webrtc.ICEGathererStateComplete {
|
if state != webrtc.ICEGathererStateComplete {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -469,7 +469,7 @@ func (t *PCTransport) handleConnectionFailed() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *PCTransport) onICEConnectionStateChange(state webrtc.ICEConnectionState) {
|
func (t *PCTransport) onICEConnectionStateChange(state webrtc.ICEConnectionState) {
|
||||||
t.params.Logger.Infow("ice connection state change", "state", state.String())
|
t.params.Logger.Debugw("ice connection state change", "state", state.String())
|
||||||
switch state {
|
switch state {
|
||||||
case webrtc.ICEConnectionStateConnected:
|
case webrtc.ICEConnectionStateConnected:
|
||||||
t.setICEConnectedAt(time.Now())
|
t.setICEConnectedAt(time.Now())
|
||||||
@@ -482,7 +482,7 @@ func (t *PCTransport) onICEConnectionStateChange(state webrtc.ICEConnectionState
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *PCTransport) onPeerConnectionStateChange(state webrtc.PeerConnectionState) {
|
func (t *PCTransport) onPeerConnectionStateChange(state webrtc.PeerConnectionState) {
|
||||||
t.params.Logger.Infow("peer connection state change", "state", state.String())
|
t.params.Logger.Debugw("peer connection state change", "state", state.String())
|
||||||
switch state {
|
switch state {
|
||||||
case webrtc.PeerConnectionStateConnected:
|
case webrtc.PeerConnectionStateConnected:
|
||||||
t.logICECandidates()
|
t.logICECandidates()
|
||||||
@@ -495,6 +495,7 @@ func (t *PCTransport) onPeerConnectionStateChange(state webrtc.PeerConnectionSta
|
|||||||
t.maybeNotifyFullyEstablished()
|
t.maybeNotifyFullyEstablished()
|
||||||
}
|
}
|
||||||
case webrtc.PeerConnectionStateFailed:
|
case webrtc.PeerConnectionStateFailed:
|
||||||
|
t.params.Logger.Infow("peer connection failed")
|
||||||
t.logICECandidates()
|
t.logICECandidates()
|
||||||
t.handleConnectionFailed()
|
t.handleConnectionFailed()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ func (u *UpTrackManager) UpdateSubscriptionPermission(
|
|||||||
// store as is for use when migrating
|
// store as is for use when migrating
|
||||||
u.subscriptionPermission = subscriptionPermission
|
u.subscriptionPermission = subscriptionPermission
|
||||||
if subscriptionPermission == nil {
|
if subscriptionPermission == nil {
|
||||||
u.params.Logger.Infow(
|
u.params.Logger.Debugw(
|
||||||
"updating subscription permission, setting to nil",
|
"updating subscription permission, setting to nil",
|
||||||
"version", u.subscriptionPermissionVersion.ToProto().String(),
|
"version", u.subscriptionPermissionVersion.ToProto().String(),
|
||||||
)
|
)
|
||||||
@@ -248,7 +248,7 @@ func (u *UpTrackManager) UpdateSubscriptionPermission(
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
u.params.Logger.Infow(
|
u.params.Logger.Debugw(
|
||||||
"updating subscription permission",
|
"updating subscription permission",
|
||||||
"permissions", u.subscriptionPermission.String(),
|
"permissions", u.subscriptionPermission.String(),
|
||||||
"version", u.subscriptionPermissionVersion.ToProto().String(),
|
"version", u.subscriptionPermissionVersion.ToProto().String(),
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ type ConnectionStats struct {
|
|||||||
lock sync.RWMutex
|
lock sync.RWMutex
|
||||||
score float32
|
score float32
|
||||||
lastUpdate time.Time
|
lastUpdate time.Time
|
||||||
isLowQuality atomic.Bool
|
|
||||||
maxExpectedLayer int32
|
maxExpectedLayer int32
|
||||||
|
|
||||||
done chan struct{}
|
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
|
return cs.score
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user