feat: support SetLogger & SetLoggerFactory (#57)

* upgrade logr to stable release v1.0.0

* feat: support SetLogger & SetLoggerFactory
This commit is contained in:
hn8
2021-07-18 21:28:09 -07:00
committed by GitHub
parent 7b05e2fb30
commit 99e9997d0a
8 changed files with 84 additions and 67 deletions
+1 -2
View File
@@ -7,7 +7,6 @@ import (
"sync/atomic"
"time"
"github.com/go-logr/zapr"
"github.com/livekit/protocol/utils"
"github.com/pion/ion-sfu/pkg/buffer"
"google.golang.org/protobuf/proto"
@@ -62,7 +61,7 @@ func NewRoom(room *livekit.Room, config WebRTCConfig, iceServers []*livekit.ICES
statsReporter: NewRoomStatsReporter(room.Name),
participants: make(map[string]types.Participant),
participantOpts: make(map[string]*ParticipantOptions),
bufferFactory: buffer.NewBufferFactory(config.Receiver.packetBufferSize, zapr.NewLogger(logger.GetLogger())),
bufferFactory: buffer.NewBufferFactory(config.Receiver.packetBufferSize, logger.GetLogger()),
}
if r.Room.EmptyTimeout == 0 {
r.Room.EmptyTimeout = DefaultEmptyTimeout