diff --git a/engine.go b/engine.go index a64a38d4..7a2dd697 100644 --- a/engine.go +++ b/engine.go @@ -237,11 +237,11 @@ func (e *RTCEngine) configure(res *livekit.JoinResponse) error { if pair, err := primaryTransport.GetSelectedCandidatePair(); err == nil { fields = append(fields, "iceCandidatePair", pair) } - logger.Infow("ICE connected", fields...) + logger.Debugw("ICE connected", fields...) case webrtc.ICEConnectionStateDisconnected: - logger.Infow("ICE disconnected") + logger.Debugw("ICE disconnected") case webrtc.ICEConnectionStateFailed: - logger.Infow("ICE failed") + logger.Debugw("ICE failed") e.handleDisconnect(false) } }) @@ -299,7 +299,7 @@ func (e *RTCEngine) configure(res *livekit.JoinResponse) error { if err := e.publisher.SetRemoteDescription(sd); err != nil { logger.Errorw("could not set remote description", err) } else { - logger.Infow("successfully set publisher answer") + logger.Debugw("successfully set publisher answer") } } e.client.OnTrickle = func(init webrtc.ICECandidateInit, target livekit.SignalTarget) { @@ -314,7 +314,7 @@ func (e *RTCEngine) configure(res *livekit.JoinResponse) error { } } e.client.OnOffer = func(sd webrtc.SessionDescription) { - logger.Infow("received offer for subscriber") + logger.Debugw("received offer for subscriber") if err := e.subscriber.SetRemoteDescription(sd); err != nil { logger.Errorw("could not set remote description", err) return @@ -546,7 +546,10 @@ func (e *RTCEngine) handleLeave(leave *livekit.LeaveRequest) { if leave.GetCanReconnect() { e.handleDisconnect(true) } else { - logger.Infow("Leave room", "reason", leave.GetReason()) + logger.Infow("server initiated leave", + "reason", leave.GetReason(), + "canReconnect", leave.GetCanReconnect(), + ) if e.OnDisconnected != nil { e.OnDisconnected() } diff --git a/transport.go b/transport.go index e07efdcd..68d091ba 100644 --- a/transport.go +++ b/transport.go @@ -148,12 +148,12 @@ func (t *PCTransport) onICEGatheringStateChange(state webrtc.ICEGathererState) { t.lock.Lock() if t.restartAfterGathering { t.lock.Unlock() - logger.Infow("restarting ICE after ICE gathering") + logger.Debugw("restarting ICE after ICE gathering") if err := t.createAndSendOffer(&webrtc.OfferOptions{ICERestart: true}); err != nil { logger.Errorw("could not restart ICE", err) } } else if t.pendingRestartIceOffer != nil { - logger.Infow("accept remote restart ice offer after ICE gathering") + logger.Debugw("accept remote restart ice offer after ICE gathering") offer := t.pendingRestartIceOffer t.pendingRestartIceOffer = nil t.lock.Unlock() @@ -213,7 +213,7 @@ func (t *PCTransport) SetRemoteDescription(sd webrtc.SessionDescription) error { } if offerRestartICE && t.pc.ICEGatheringState() == webrtc.ICEGatheringStateGathering { - logger.Infow("remote offer restart ice while ice gathering") + logger.Debugw("remote offer restart ice while ice gathering") t.pendingRestartIceOffer = &sd t.lock.Unlock() return nil