mirror of
https://github.com/livekit/livekit.git
synced 2026-03-30 13:25:42 +00:00
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",
|
||||
"failed to send packet",
|
||||
"Ignoring remote candidate with tcpType active",
|
||||
"discard message from",
|
||||
},
|
||||
"pc": {
|
||||
"Failed to accept RTCP stream is already closed",
|
||||
|
||||
@@ -766,20 +766,9 @@ func (p *ParticipantImpl) GetConnectionQuality() *livekit.ConnectionQualityInfo
|
||||
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{
|
||||
ParticipantSid: string(p.ID()),
|
||||
Quality: rating,
|
||||
Quality: connectionquality.Score2Rating(avgScore),
|
||||
Score: avgScore,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -435,7 +435,7 @@ func (t *PCTransport) setConnectedAt(at time.Time) bool {
|
||||
}
|
||||
|
||||
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 {
|
||||
return
|
||||
}
|
||||
@@ -469,7 +469,7 @@ func (t *PCTransport) handleConnectionFailed() {
|
||||
}
|
||||
|
||||
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 {
|
||||
case webrtc.ICEConnectionStateConnected:
|
||||
t.setICEConnectedAt(time.Now())
|
||||
@@ -482,7 +482,7 @@ func (t *PCTransport) onICEConnectionStateChange(state webrtc.ICEConnectionState
|
||||
}
|
||||
|
||||
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 {
|
||||
case webrtc.PeerConnectionStateConnected:
|
||||
t.logICECandidates()
|
||||
@@ -495,6 +495,7 @@ func (t *PCTransport) onPeerConnectionStateChange(state webrtc.PeerConnectionSta
|
||||
t.maybeNotifyFullyEstablished()
|
||||
}
|
||||
case webrtc.PeerConnectionStateFailed:
|
||||
t.params.Logger.Infow("peer connection failed")
|
||||
t.logICECandidates()
|
||||
t.handleConnectionFailed()
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ func (u *UpTrackManager) UpdateSubscriptionPermission(
|
||||
// store as is for use when migrating
|
||||
u.subscriptionPermission = subscriptionPermission
|
||||
if subscriptionPermission == nil {
|
||||
u.params.Logger.Infow(
|
||||
u.params.Logger.Debugw(
|
||||
"updating subscription permission, setting to nil",
|
||||
"version", u.subscriptionPermissionVersion.ToProto().String(),
|
||||
)
|
||||
@@ -248,7 +248,7 @@ func (u *UpTrackManager) UpdateSubscriptionPermission(
|
||||
return nil
|
||||
}
|
||||
|
||||
u.params.Logger.Infow(
|
||||
u.params.Logger.Debugw(
|
||||
"updating subscription permission",
|
||||
"permissions", u.subscriptionPermission.String(),
|
||||
"version", u.subscriptionPermissionVersion.ToProto().String(),
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user