Logging cleanup (#843)

* Logging cleanup

Changes log levels to better match significance

* fix lock
This commit is contained in:
David Zhao
2022-07-21 00:39:49 -07:00
committed by GitHub
parent f2e1e67e58
commit 53f51c8cb0
17 changed files with 45 additions and 55 deletions
+2 -3
View File
@@ -374,8 +374,8 @@ func (t *PCTransport) createAndSendOffer(options *webrtc.OfferOptions) error {
// restart without current remote description, sent current local description again to try recover
offer := t.pc.LocalDescription()
if offer == nil {
// it should not happend, check for safety
t.params.Logger.Infow("ice restart without local offer")
// it should not happen, log just in case
t.params.Logger.Warnw("ice restart without local offer", nil)
return ErrIceRestartWithoutLocalSDP
} else {
t.negotiationState = negotiationRetry
@@ -449,7 +449,6 @@ func (t *PCTransport) createAndSendOffer(options *webrtc.OfferOptions) error {
failed := t.negotiationState != negotiationStateNone
t.lock.RUnlock()
if t.negotiateCounter.Load() == negotiateVersion && failed {
t.params.Logger.Infow("negotiation timeout")
if t.onNegotiationFailed != nil {
t.onNegotiationFailed()
}