diff --git a/pkg/sfu/receiver.go b/pkg/sfu/receiver.go index 4c99c62af..212034646 100644 --- a/pkg/sfu/receiver.go +++ b/pkg/sfu/receiver.go @@ -13,7 +13,6 @@ import ( "github.com/pion/rtcp" "github.com/pion/rtp" "github.com/pion/webrtc/v3" - "github.com/rs/zerolog/log" ) // Receiver defines a interface for a track receivers @@ -374,7 +373,7 @@ func (w *WebRTCReceiver) writeRTP(layer int) { w.deleteDownTrack(layer, dt.id) w.Unlock() } - log.Error().Err(err).Str("id", dt.id).Msg("Error writing to down track") + Logger.Error(err, "Error writing to down track", "id", dt.id) } } } diff --git a/pkg/sfu/session.go b/pkg/sfu/session.go index a15f1e930..76eee20c8 100644 --- a/pkg/sfu/session.go +++ b/pkg/sfu/session.go @@ -5,9 +5,7 @@ import ( "sync" "time" - "github.com/pion/ion-sfu/pkg/logger" "github.com/pion/ion-sfu/pkg/relay" - "github.com/rs/zerolog/log" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -105,16 +103,16 @@ func (s *SessionLocal) AddRelayPeer(peerID string, signalData []byte) ([]byte, e }, &relay.PeerConfig{ SettingEngine: s.config.Setting, ICEServers: s.config.Configuration.ICEServers, - Logger: logger.New(), + Logger: Logger, }) if err != nil { - log.Err(err).Msg("Creating relay peer") + Logger.Error(err, "Creating relay peer") return nil, status.Error(codes.Internal, err.Error()) } resp, err := p.Answer(signalData) if err != nil { - log.Err(err).Msg("Creating answer for relay") + Logger.Error(err, "Creating answer for relay") return nil, err }