Cleanup pass through logging (#1073)
* added filtering for noisy pion logs * demoted some logs to debug * using consistent trackID / participant / publisher / subscriber terminology * removed ice candidate log lines, deferring to combined log
This commit is contained in:
+15
-8
@@ -718,13 +718,17 @@ func (r *Room) onTrackPublished(participant types.LocalParticipant, track types.
|
||||
}
|
||||
|
||||
r.Logger.Debugw("subscribing to new track",
|
||||
"participants", []livekit.ParticipantIdentity{participant.Identity(), existingParticipant.Identity()},
|
||||
"pIDs", []livekit.ParticipantID{participant.ID(), existingParticipant.ID()},
|
||||
"participant", existingParticipant.Identity(),
|
||||
"pID", existingParticipant.ID(),
|
||||
"publisher", participant.Identity(),
|
||||
"publisherID", participant.ID(),
|
||||
"trackID", track.ID())
|
||||
if _, err := participant.AddSubscriber(existingParticipant, types.AddSubscriberParams{TrackIDs: []livekit.TrackID{track.ID()}}); err != nil {
|
||||
r.Logger.Errorw("could not subscribe to remoteTrack", err,
|
||||
"participants", []livekit.ParticipantIdentity{participant.Identity(), existingParticipant.Identity()},
|
||||
"pIDs", []livekit.ParticipantID{participant.ID(), existingParticipant.ID()},
|
||||
"participant", existingParticipant.Identity(),
|
||||
"pID", existingParticipant.ID(),
|
||||
"publisher", participant.Identity(),
|
||||
"publisherID", participant.ID(),
|
||||
"trackID", track.ID())
|
||||
}
|
||||
}
|
||||
@@ -814,14 +818,17 @@ func (r *Room) subscribeToExistingTracks(p types.LocalParticipant) int {
|
||||
n, err := op.AddSubscriber(p, types.AddSubscriberParams{AllTracks: true})
|
||||
if err != nil {
|
||||
// TODO: log error? or disconnect?
|
||||
r.Logger.Errorw("could not subscribe to participant", err,
|
||||
"participants", []livekit.ParticipantIdentity{op.Identity(), p.Identity()},
|
||||
"pIDs", []livekit.ParticipantID{op.ID(), p.ID()})
|
||||
r.Logger.Errorw("could not subscribe to publisher", err,
|
||||
"participant", p.Identity(),
|
||||
"pID", p.ID(),
|
||||
"publisher", op.Identity(),
|
||||
"publisherID", op.ID(),
|
||||
)
|
||||
}
|
||||
tracksAdded += n
|
||||
}
|
||||
if tracksAdded > 0 {
|
||||
r.Logger.Debugw("subscribed participants to existing tracks", "tracks", tracksAdded)
|
||||
r.Logger.Debugw("subscribed participants to existing tracks", "trackID", tracksAdded)
|
||||
}
|
||||
return tracksAdded
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user