Integrate logger components (#1933)
* Integrate logger components Dividing into the following components * pub - publisher * pub.sfu * sub - subscriber * transport * transport.pion * transport.cc * api * webhook * update go modules
This commit is contained in:
+1
-1
@@ -202,7 +202,7 @@ func getConfig(c *cli.Context) (*config.Config, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
config.InitLoggerFromConfig(conf.Logging)
|
config.InitLoggerFromConfig(&conf.Logging)
|
||||||
|
|
||||||
if c.String("config") == "" && c.String("config-body") == "" && conf.Development {
|
if c.String("config") == "" && c.String("config-body") == "" && conf.Development {
|
||||||
// use single port UDP when no config is provided
|
// use single port UDP when no config is provided
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ require (
|
|||||||
github.com/jxskiss/base62 v1.1.0
|
github.com/jxskiss/base62 v1.1.0
|
||||||
github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1
|
github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1
|
||||||
github.com/livekit/mediatransportutil v0.0.0-20230716190407-fc4944cbc33a
|
github.com/livekit/mediatransportutil v0.0.0-20230716190407-fc4944cbc33a
|
||||||
github.com/livekit/protocol v1.5.11-0.20230803081122-d791f31b6e0f
|
github.com/livekit/protocol v1.6.0
|
||||||
github.com/livekit/psrpc v0.3.2
|
github.com/livekit/psrpc v0.3.2
|
||||||
github.com/mackerelio/go-osstat v0.2.4
|
github.com/mackerelio/go-osstat v0.2.4
|
||||||
github.com/magefile/mage v1.15.0
|
github.com/magefile/mage v1.15.0
|
||||||
|
|||||||
@@ -124,8 +124,8 @@ github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1 h1:jm09419p0lqTkD
|
|||||||
github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ=
|
github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ=
|
||||||
github.com/livekit/mediatransportutil v0.0.0-20230716190407-fc4944cbc33a h1:JWpPHcMFuw0fP4swE89CfMgeUXiSN5IKvCJL/5HLI3A=
|
github.com/livekit/mediatransportutil v0.0.0-20230716190407-fc4944cbc33a h1:JWpPHcMFuw0fP4swE89CfMgeUXiSN5IKvCJL/5HLI3A=
|
||||||
github.com/livekit/mediatransportutil v0.0.0-20230716190407-fc4944cbc33a/go.mod h1:xirUXW8xnLGmfCwUeAv/nj1VGo1OO1BmgxrYP7jK/14=
|
github.com/livekit/mediatransportutil v0.0.0-20230716190407-fc4944cbc33a/go.mod h1:xirUXW8xnLGmfCwUeAv/nj1VGo1OO1BmgxrYP7jK/14=
|
||||||
github.com/livekit/protocol v1.5.11-0.20230803081122-d791f31b6e0f h1:nhkzJVWnRePDo6imcFnuIljwU8MTBjcRdzfdLaVdWXw=
|
github.com/livekit/protocol v1.6.0 h1:19S+vFZqnivKIOpyR3DEK/mSaykQ3UEf7H2G/mBOE54=
|
||||||
github.com/livekit/protocol v1.5.11-0.20230803081122-d791f31b6e0f/go.mod h1:SUS9foM1xBzw/AFrgTJuFX/oSuwlnIbHmpdiPdCvwEM=
|
github.com/livekit/protocol v1.6.0/go.mod h1:SUS9foM1xBzw/AFrgTJuFX/oSuwlnIbHmpdiPdCvwEM=
|
||||||
github.com/livekit/psrpc v0.3.2 h1:eAaJhASme33gtoBhCRLH9jsnWcdm1tHWf0WzaDk56ew=
|
github.com/livekit/psrpc v0.3.2 h1:eAaJhASme33gtoBhCRLH9jsnWcdm1tHWf0WzaDk56ew=
|
||||||
github.com/livekit/psrpc v0.3.2/go.mod h1:n6JntEg+zT6Ji8InoyTpV7wusPNwGqqtxmHlkNhDN0U=
|
github.com/livekit/psrpc v0.3.2/go.mod h1:n6JntEg+zT6Ji8InoyTpV7wusPNwGqqtxmHlkNhDN0U=
|
||||||
github.com/mackerelio/go-osstat v0.2.4 h1:qxGbdPkFo65PXOb/F/nhDKpF2nGmGaCFDLXoZjJTtUs=
|
github.com/mackerelio/go-osstat v0.2.4 h1:qxGbdPkFo65PXOb/F/nhDKpF2nGmGaCFDLXoZjJTtUs=
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import (
|
|||||||
|
|
||||||
"github.com/livekit/mediatransportutil/pkg/rtcconfig"
|
"github.com/livekit/mediatransportutil/pkg/rtcconfig"
|
||||||
"github.com/livekit/protocol/logger"
|
"github.com/livekit/protocol/logger"
|
||||||
"github.com/livekit/protocol/logger/pionlogger"
|
|
||||||
redisLiveKit "github.com/livekit/protocol/redis"
|
redisLiveKit "github.com/livekit/protocol/redis"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -525,6 +524,13 @@ func NewConfig(confString string, strictMode bool, c *cli.Context, baseFlags []c
|
|||||||
if conf.Logging.Level == "" && conf.Development {
|
if conf.Logging.Level == "" && conf.Development {
|
||||||
conf.Logging.Level = "debug"
|
conf.Logging.Level = "debug"
|
||||||
}
|
}
|
||||||
|
if conf.Logging.PionLevel != "" {
|
||||||
|
if conf.Logging.ComponentLevels == nil {
|
||||||
|
conf.Logging.ComponentLevels = map[string]string{}
|
||||||
|
}
|
||||||
|
conf.Logging.ComponentLevels["transport.pion"] = conf.Logging.PionLevel
|
||||||
|
conf.Logging.ComponentLevels["pion"] = conf.Logging.PionLevel
|
||||||
|
}
|
||||||
|
|
||||||
if conf.Development {
|
if conf.Development {
|
||||||
conf.Environment = "dev"
|
conf.Environment = "dev"
|
||||||
@@ -818,7 +824,6 @@ func SetLogger(l logger.Logger) {
|
|||||||
logger.SetLogger(l, "livekit")
|
logger.SetLogger(l, "livekit")
|
||||||
}
|
}
|
||||||
|
|
||||||
func InitLoggerFromConfig(config LoggingConfig) {
|
func InitLoggerFromConfig(config *LoggingConfig) {
|
||||||
pionlogger.SetLogLevel(config.PionLevel)
|
logger.InitFromConfig(&config.Config, "livekit")
|
||||||
logger.InitFromConfig(config.Config, "livekit")
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import (
|
|||||||
"github.com/pion/webrtc/v3"
|
"github.com/pion/webrtc/v3"
|
||||||
"go.uber.org/atomic"
|
"go.uber.org/atomic"
|
||||||
|
|
||||||
|
sutils "github.com/livekit/livekit-server/pkg/utils"
|
||||||
"github.com/livekit/protocol/livekit"
|
"github.com/livekit/protocol/livekit"
|
||||||
"github.com/livekit/protocol/logger"
|
"github.com/livekit/protocol/logger"
|
||||||
|
|
||||||
@@ -133,7 +134,7 @@ func (t *MediaTrackSubscriptions) AddSubscriber(sub types.LocalParticipant, wr *
|
|||||||
PlayoutDelayLimit: sub.GetPlayoutDelayConfig(),
|
PlayoutDelayLimit: sub.GetPlayoutDelayConfig(),
|
||||||
Pacer: sub.GetPacer(),
|
Pacer: sub.GetPacer(),
|
||||||
Trailer: trailer,
|
Trailer: trailer,
|
||||||
Logger: LoggerWithTrack(sub.GetLogger(), trackID, t.params.IsRelayed),
|
Logger: LoggerWithTrack(sub.GetLogger().WithComponent(sutils.ComponentSub), trackID, t.params.IsRelayed),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
+39
-32
@@ -41,6 +41,7 @@ import (
|
|||||||
"github.com/livekit/livekit-server/pkg/sfu/streamallocator"
|
"github.com/livekit/livekit-server/pkg/sfu/streamallocator"
|
||||||
"github.com/livekit/livekit-server/pkg/telemetry"
|
"github.com/livekit/livekit-server/pkg/telemetry"
|
||||||
"github.com/livekit/livekit-server/pkg/telemetry/prometheus"
|
"github.com/livekit/livekit-server/pkg/telemetry/prometheus"
|
||||||
|
sutils "github.com/livekit/livekit-server/pkg/utils"
|
||||||
"github.com/livekit/mediatransportutil/pkg/twcc"
|
"github.com/livekit/mediatransportutil/pkg/twcc"
|
||||||
"github.com/livekit/protocol/auth"
|
"github.com/livekit/protocol/auth"
|
||||||
"github.com/livekit/protocol/livekit"
|
"github.com/livekit/protocol/livekit"
|
||||||
@@ -187,6 +188,10 @@ type ParticipantImpl struct {
|
|||||||
supervisor *supervisor.ParticipantSupervisor
|
supervisor *supervisor.ParticipantSupervisor
|
||||||
|
|
||||||
tracksQuality map[livekit.TrackID]livekit.ConnectionQuality
|
tracksQuality map[livekit.TrackID]livekit.ConnectionQuality
|
||||||
|
|
||||||
|
// loggers for publisher and subscriber
|
||||||
|
pubLogger logger.Logger
|
||||||
|
subLogger logger.Logger
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewParticipant(params ParticipantParams) (*ParticipantImpl, error) {
|
func NewParticipant(params ParticipantParams) (*ParticipantImpl, error) {
|
||||||
@@ -213,6 +218,8 @@ func NewParticipant(params ParticipantParams) (*ParticipantImpl, error) {
|
|||||||
params.Telemetry),
|
params.Telemetry),
|
||||||
supervisor: supervisor.NewParticipantSupervisor(supervisor.ParticipantSupervisorParams{Logger: params.Logger}),
|
supervisor: supervisor.NewParticipantSupervisor(supervisor.ParticipantSupervisorParams{Logger: params.Logger}),
|
||||||
tracksQuality: make(map[livekit.TrackID]livekit.ConnectionQuality),
|
tracksQuality: make(map[livekit.TrackID]livekit.ConnectionQuality),
|
||||||
|
pubLogger: params.Logger.WithComponent(sutils.ComponentPub),
|
||||||
|
subLogger: params.Logger.WithComponent(sutils.ComponentSub),
|
||||||
}
|
}
|
||||||
p.version.Store(params.InitialVersion)
|
p.version.Store(params.InitialVersion)
|
||||||
p.timedVersion.Update(params.VersionGenerator.New())
|
p.timedVersion.Update(params.VersionGenerator.New())
|
||||||
@@ -1106,7 +1113,7 @@ func (p *ParticipantImpl) setupTransportManager() error {
|
|||||||
AllowUDPUnstableFallback: p.params.AllowUDPUnstableFallback,
|
AllowUDPUnstableFallback: p.params.AllowUDPUnstableFallback,
|
||||||
TURNSEnabled: p.params.TURNSEnabled,
|
TURNSEnabled: p.params.TURNSEnabled,
|
||||||
AllowPlayoutDelay: p.params.PlayoutDelay.GetEnabled() && p.SupportSyncStreamID(),
|
AllowPlayoutDelay: p.params.PlayoutDelay.GetEnabled() && p.SupportSyncStreamID(),
|
||||||
Logger: p.params.Logger,
|
Logger: p.params.Logger.WithComponent(sutils.ComponentTransport),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -1161,7 +1168,7 @@ func (p *ParticipantImpl) setupTransportManager() error {
|
|||||||
func (p *ParticipantImpl) setupUpTrackManager() {
|
func (p *ParticipantImpl) setupUpTrackManager() {
|
||||||
p.UpTrackManager = NewUpTrackManager(UpTrackManagerParams{
|
p.UpTrackManager = NewUpTrackManager(UpTrackManagerParams{
|
||||||
SID: p.params.SID,
|
SID: p.params.SID,
|
||||||
Logger: p.params.Logger,
|
Logger: p.pubLogger,
|
||||||
VersionGenerator: p.params.VersionGenerator,
|
VersionGenerator: p.params.VersionGenerator,
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -1182,7 +1189,7 @@ func (p *ParticipantImpl) setupUpTrackManager() {
|
|||||||
func (p *ParticipantImpl) setupSubscriptionManager() {
|
func (p *ParticipantImpl) setupSubscriptionManager() {
|
||||||
p.SubscriptionManager = NewSubscriptionManager(SubscriptionManagerParams{
|
p.SubscriptionManager = NewSubscriptionManager(SubscriptionManagerParams{
|
||||||
Participant: p,
|
Participant: p,
|
||||||
Logger: p.params.Logger.WithoutSampler(),
|
Logger: p.subLogger.WithoutSampler(),
|
||||||
TrackResolver: p.params.TrackResolver,
|
TrackResolver: p.params.TrackResolver,
|
||||||
Telemetry: p.params.Telemetry,
|
Telemetry: p.params.Telemetry,
|
||||||
OnTrackSubscribed: p.onTrackSubscribed,
|
OnTrackSubscribed: p.onTrackSubscribed,
|
||||||
@@ -1269,7 +1276,7 @@ func (p *ParticipantImpl) onMediaTrack(track *webrtc.TrackRemote, rtpReceiver *w
|
|||||||
|
|
||||||
publishedTrack, isNewTrack := p.mediaTrackReceived(track, rtpReceiver)
|
publishedTrack, isNewTrack := p.mediaTrackReceived(track, rtpReceiver)
|
||||||
if publishedTrack == nil {
|
if publishedTrack == nil {
|
||||||
p.params.Logger.Warnw("webrtc Track published but can't find MediaTrack", nil,
|
p.pubLogger.Warnw("webrtc Track published but can't find MediaTrack", nil,
|
||||||
"kind", track.Kind().String(),
|
"kind", track.Kind().String(),
|
||||||
"webrtcTrackID", track.ID(),
|
"webrtcTrackID", track.ID(),
|
||||||
"rid", track.RID(),
|
"rid", track.RID(),
|
||||||
@@ -1280,7 +1287,7 @@ func (p *ParticipantImpl) onMediaTrack(track *webrtc.TrackRemote, rtpReceiver *w
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !p.CanPublishSource(publishedTrack.Source()) {
|
if !p.CanPublishSource(publishedTrack.Source()) {
|
||||||
p.params.Logger.Warnw("no permission to publish mediaTrack", nil,
|
p.pubLogger.Warnw("no permission to publish mediaTrack", nil,
|
||||||
"source", publishedTrack.Source(),
|
"source", publishedTrack.Source(),
|
||||||
)
|
)
|
||||||
p.removePublishedTrack(publishedTrack)
|
p.removePublishedTrack(publishedTrack)
|
||||||
@@ -1290,7 +1297,7 @@ func (p *ParticipantImpl) onMediaTrack(track *webrtc.TrackRemote, rtpReceiver *w
|
|||||||
p.setIsPublisher(true)
|
p.setIsPublisher(true)
|
||||||
p.dirty.Store(true)
|
p.dirty.Store(true)
|
||||||
|
|
||||||
p.params.Logger.Infow("mediaTrack published",
|
p.pubLogger.Infow("mediaTrack published",
|
||||||
"kind", track.Kind().String(),
|
"kind", track.Kind().String(),
|
||||||
"trackID", publishedTrack.ID(),
|
"trackID", publishedTrack.ID(),
|
||||||
"webrtcTrackID", track.ID(),
|
"webrtcTrackID", track.ID(),
|
||||||
@@ -1318,7 +1325,7 @@ func (p *ParticipantImpl) onDataMessage(kind livekit.DataPacket_Kind, data []byt
|
|||||||
|
|
||||||
dp := livekit.DataPacket{}
|
dp := livekit.DataPacket{}
|
||||||
if err := proto.Unmarshal(data, &dp); err != nil {
|
if err := proto.Unmarshal(data, &dp); err != nil {
|
||||||
p.params.Logger.Warnw("could not parse data packet", err)
|
p.pubLogger.Warnw("could not parse data packet", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1336,7 +1343,7 @@ func (p *ParticipantImpl) onDataMessage(kind livekit.DataPacket_Kind, data []byt
|
|||||||
onDataPacket(p, &dp)
|
onDataPacket(p, &dp)
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
p.params.Logger.Warnw("received unsupported data packet", nil, "payload", payload)
|
p.pubLogger.Warnw("received unsupported data packet", nil, "payload", payload)
|
||||||
}
|
}
|
||||||
|
|
||||||
p.setIsPublisher(true)
|
p.setIsPublisher(true)
|
||||||
@@ -1445,7 +1452,7 @@ func (p *ParticipantImpl) subscriberRTCPWorker() {
|
|||||||
if IsEOF(err) {
|
if IsEOF(err) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
p.params.Logger.Errorw("could not send down track reports", err)
|
p.subLogger.Errorw("could not send down track reports", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
pkts = pkts[:0]
|
pkts = pkts[:0]
|
||||||
@@ -1462,7 +1469,7 @@ func (p *ParticipantImpl) subscriberRTCPWorker() {
|
|||||||
if IsEOF(err) {
|
if IsEOF(err) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
p.params.Logger.Errorw("could not send down track reports", err)
|
p.subLogger.Errorw("could not send down track reports", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1545,7 +1552,7 @@ func (p *ParticipantImpl) onSubscribedMaxQualityChange(trackID livekit.TrackID,
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
p.params.Logger.Infow(
|
p.pubLogger.Infow(
|
||||||
"sending max subscribed quality",
|
"sending max subscribed quality",
|
||||||
"trackID", trackID,
|
"trackID", trackID,
|
||||||
"qualities", subscribedQualities,
|
"qualities", subscribedQualities,
|
||||||
@@ -1565,7 +1572,7 @@ func (p *ParticipantImpl) addPendingTrackLocked(req *livekit.AddTrackRequest) *l
|
|||||||
if req.Sid != "" {
|
if req.Sid != "" {
|
||||||
track := p.GetPublishedTrack(livekit.TrackID(req.Sid))
|
track := p.GetPublishedTrack(livekit.TrackID(req.Sid))
|
||||||
if track == nil {
|
if track == nil {
|
||||||
p.params.Logger.Infow("could not find existing track for multi-codec simulcast", "trackID", req.Sid)
|
p.pubLogger.Infow("could not find existing track for multi-codec simulcast", "trackID", req.Sid)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1616,17 +1623,17 @@ func (p *ParticipantImpl) addPendingTrackLocked(req *livekit.AddTrackRequest) *l
|
|||||||
} else {
|
} else {
|
||||||
p.pendingTracks[req.Cid].trackInfos = append(p.pendingTracks[req.Cid].trackInfos, ti)
|
p.pendingTracks[req.Cid].trackInfos = append(p.pendingTracks[req.Cid].trackInfos, ti)
|
||||||
}
|
}
|
||||||
p.params.Logger.Infow("pending track queued", "trackID", ti.Sid, "track", ti.String(), "request", req.String())
|
p.pubLogger.Infow("pending track queued", "trackID", ti.Sid, "track", ti.String(), "request", req.String())
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
p.pendingTracks[req.Cid] = &pendingTrackInfo{trackInfos: []*livekit.TrackInfo{ti}}
|
p.pendingTracks[req.Cid] = &pendingTrackInfo{trackInfos: []*livekit.TrackInfo{ti}}
|
||||||
p.params.Logger.Infow("pending track added", "trackID", ti.Sid, "track", ti.String(), "request", req.String())
|
p.pubLogger.Infow("pending track added", "trackID", ti.Sid, "track", ti.String(), "request", req.String())
|
||||||
return ti
|
return ti
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *ParticipantImpl) sendTrackPublished(cid string, ti *livekit.TrackInfo) {
|
func (p *ParticipantImpl) sendTrackPublished(cid string, ti *livekit.TrackInfo) {
|
||||||
p.params.Logger.Debugw("sending track published", "cid", cid, "trackInfo", ti.String())
|
p.pubLogger.Debugw("sending track published", "cid", cid, "trackInfo", ti.String())
|
||||||
_ = p.writeMessage(&livekit.SignalResponse{
|
_ = p.writeMessage(&livekit.SignalResponse{
|
||||||
Message: &livekit.SignalResponse_TrackPublished{
|
Message: &livekit.SignalResponse_TrackPublished{
|
||||||
TrackPublished: &livekit.TrackPublishedResponse{
|
TrackPublished: &livekit.TrackPublishedResponse{
|
||||||
@@ -1678,7 +1685,7 @@ func (p *ParticipantImpl) setTrackMuted(trackID livekit.TrackID, muted bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !isPending && track == nil {
|
if !isPending && track == nil {
|
||||||
p.params.Logger.Warnw("could not locate track", nil, "trackID", trackID)
|
p.pubLogger.Warnw("could not locate track", nil, "trackID", trackID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1686,7 +1693,7 @@ func (p *ParticipantImpl) mediaTrackReceived(track *webrtc.TrackRemote, rtpRecei
|
|||||||
p.pendingTracksLock.Lock()
|
p.pendingTracksLock.Lock()
|
||||||
newTrack := false
|
newTrack := false
|
||||||
|
|
||||||
p.params.Logger.Debugw(
|
p.pubLogger.Debugw(
|
||||||
"media track received",
|
"media track received",
|
||||||
"kind", track.Kind().String(),
|
"kind", track.Kind().String(),
|
||||||
"trackID", track.ID(),
|
"trackID", track.ID(),
|
||||||
@@ -1696,7 +1703,7 @@ func (p *ParticipantImpl) mediaTrackReceived(track *webrtc.TrackRemote, rtpRecei
|
|||||||
)
|
)
|
||||||
mid := p.TransportManager.GetPublisherMid(rtpReceiver)
|
mid := p.TransportManager.GetPublisherMid(rtpReceiver)
|
||||||
if mid == "" {
|
if mid == "" {
|
||||||
p.params.Logger.Warnw("could not get mid for track", nil, "trackID", track.ID())
|
p.pubLogger.Warnw("could not get mid for track", nil, "trackID", track.ID())
|
||||||
return nil, false
|
return nil, false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1735,10 +1742,10 @@ func (p *ParticipantImpl) mediaTrackReceived(track *webrtc.TrackRemote, rtpRecei
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *ParticipantImpl) addMigrateMutedTrack(cid string, ti *livekit.TrackInfo) *MediaTrack {
|
func (p *ParticipantImpl) addMigrateMutedTrack(cid string, ti *livekit.TrackInfo) *MediaTrack {
|
||||||
p.params.Logger.Infow("add migrate muted track", "cid", cid, "trackID", ti.Sid, "track", ti.String())
|
p.pubLogger.Infow("add migrate muted track", "cid", cid, "trackID", ti.Sid, "track", ti.String())
|
||||||
rtpReceiver := p.TransportManager.GetPublisherRTPReceiver(ti.Mid)
|
rtpReceiver := p.TransportManager.GetPublisherRTPReceiver(ti.Mid)
|
||||||
if rtpReceiver == nil {
|
if rtpReceiver == nil {
|
||||||
p.params.Logger.Errorw("could not find receiver for migrated track", nil, "trackID", ti.Sid)
|
p.pubLogger.Errorw("could not find receiver for migrated track", nil, "trackID", ti.Sid)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1801,7 +1808,7 @@ func (p *ParticipantImpl) addMediaTrack(signalCid string, sdpCid string, ti *liv
|
|||||||
AudioConfig: p.params.AudioConfig,
|
AudioConfig: p.params.AudioConfig,
|
||||||
VideoConfig: p.params.VideoConfig,
|
VideoConfig: p.params.VideoConfig,
|
||||||
Telemetry: p.params.Telemetry,
|
Telemetry: p.params.Telemetry,
|
||||||
Logger: LoggerWithTrack(p.params.Logger, livekit.TrackID(ti.Sid), false),
|
Logger: LoggerWithTrack(p.pubLogger, livekit.TrackID(ti.Sid), false),
|
||||||
SubscriberConfig: p.params.Config.Subscriber,
|
SubscriberConfig: p.params.Config.Subscriber,
|
||||||
PLIThrottleConfig: p.params.PLIThrottleConfig,
|
PLIThrottleConfig: p.params.PLIThrottleConfig,
|
||||||
SimTracks: p.params.SimTracks,
|
SimTracks: p.params.SimTracks,
|
||||||
@@ -1816,7 +1823,7 @@ func (p *ParticipantImpl) addMediaTrack(signalCid string, sdpCid string, ti *liv
|
|||||||
pti := p.pendingTracks[signalCid]
|
pti := p.pendingTracks[signalCid]
|
||||||
if pti != nil {
|
if pti != nil {
|
||||||
if p.pendingPublishingTracks[livekit.TrackID(ti.Sid)] != nil {
|
if p.pendingPublishingTracks[livekit.TrackID(ti.Sid)] != nil {
|
||||||
p.params.Logger.Infow("unexpected pending publish track", "trackID", ti.Sid)
|
p.pubLogger.Infow("unexpected pending publish track", "trackID", ti.Sid)
|
||||||
}
|
}
|
||||||
p.pendingPublishingTracks[livekit.TrackID(ti.Sid)] = &pendingTrackInfo{
|
p.pendingPublishingTracks[livekit.TrackID(ti.Sid)] = &pendingTrackInfo{
|
||||||
trackInfos: []*livekit.TrackInfo{pti.trackInfos[0]},
|
trackInfos: []*livekit.TrackInfo{pti.trackInfos[0]},
|
||||||
@@ -1855,7 +1862,7 @@ func (p *ParticipantImpl) addMediaTrack(signalCid string, sdpCid string, ti *liv
|
|||||||
|
|
||||||
if !p.IsClosed() {
|
if !p.IsClosed() {
|
||||||
// unpublished events aren't necessary when participant is closed
|
// unpublished events aren't necessary when participant is closed
|
||||||
p.params.Logger.Infow("unpublished track", "trackID", ti.Sid, "trackInfo", ti)
|
p.pubLogger.Infow("unpublished track", "trackID", ti.Sid, "trackInfo", ti)
|
||||||
p.lock.RLock()
|
p.lock.RLock()
|
||||||
onTrackUnpublished := p.onTrackUnpublished
|
onTrackUnpublished := p.onTrackUnpublished
|
||||||
p.lock.RUnlock()
|
p.lock.RUnlock()
|
||||||
@@ -1952,7 +1959,7 @@ func (p *ParticipantImpl) getPendingTrack(clientId string, kind livekit.TrackTyp
|
|||||||
|
|
||||||
// if still not found, we are done
|
// if still not found, we are done
|
||||||
if pendingInfo == nil {
|
if pendingInfo == nil {
|
||||||
p.params.Logger.Errorw("track info not published prior to track", nil, "clientId", clientId)
|
p.pubLogger.Errorw("track info not published prior to track", nil, "clientId", clientId)
|
||||||
return signalCid, nil
|
return signalCid, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2030,7 +2037,7 @@ func (p *ParticipantImpl) getPublishedTrackBySignalCid(clientId string) types.Me
|
|||||||
func (p *ParticipantImpl) getPublishedTrackBySdpCid(clientId string) types.MediaTrack {
|
func (p *ParticipantImpl) getPublishedTrackBySdpCid(clientId string) types.MediaTrack {
|
||||||
for _, publishedTrack := range p.GetPublishedTracks() {
|
for _, publishedTrack := range p.GetPublishedTracks() {
|
||||||
if publishedTrack.(types.LocalMediaTrack).HasSdpCid(clientId) {
|
if publishedTrack.(types.LocalMediaTrack).HasSdpCid(clientId) {
|
||||||
p.params.Logger.Debugw("found track by sdp cid", "sdpCid", clientId, "trackID", publishedTrack.ID())
|
p.pubLogger.Debugw("found track by SDP cid", "sdpCid", clientId, "trackID", publishedTrack.ID())
|
||||||
return publishedTrack
|
return publishedTrack
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2048,13 +2055,13 @@ func (p *ParticipantImpl) publisherRTCPWorker() {
|
|||||||
// read from rtcpChan
|
// read from rtcpChan
|
||||||
for pkts := range p.rtcpCh {
|
for pkts := range p.rtcpCh {
|
||||||
if pkts == nil {
|
if pkts == nil {
|
||||||
p.params.Logger.Debugw("exiting publisher RTCP worker")
|
p.pubLogger.Debugw("exiting publisher RTCP worker")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := p.TransportManager.WritePublisherRTCP(pkts); err != nil {
|
if err := p.TransportManager.WritePublisherRTCP(pkts); err != nil {
|
||||||
if !IsEOF(err) {
|
if !IsEOF(err) {
|
||||||
p.params.Logger.Errorw("could not write RTCP to participant", err)
|
p.pubLogger.Errorw("could not write RTCP to participant", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2106,7 +2113,7 @@ func (p *ParticipantImpl) setDowntracksConnected() {
|
|||||||
func (p *ParticipantImpl) CacheDownTrack(trackID livekit.TrackID, rtpTransceiver *webrtc.RTPTransceiver, downTrack sfu.DownTrackState) {
|
func (p *ParticipantImpl) CacheDownTrack(trackID livekit.TrackID, rtpTransceiver *webrtc.RTPTransceiver, downTrack sfu.DownTrackState) {
|
||||||
p.lock.Lock()
|
p.lock.Lock()
|
||||||
if existing := p.cachedDownTracks[trackID]; existing != nil && existing.transceiver != rtpTransceiver {
|
if existing := p.cachedDownTracks[trackID]; existing != nil && existing.transceiver != rtpTransceiver {
|
||||||
p.params.Logger.Infow("cached transceiver changed", "trackID", trackID)
|
p.subLogger.Infow("cached transceiver changed", "trackID", trackID)
|
||||||
}
|
}
|
||||||
p.cachedDownTracks[trackID] = &downTrackState{transceiver: rtpTransceiver, downTrack: downTrack}
|
p.cachedDownTracks[trackID] = &downTrackState{transceiver: rtpTransceiver, downTrack: downTrack}
|
||||||
p.lock.Unlock()
|
p.lock.Unlock()
|
||||||
@@ -2162,7 +2169,7 @@ func (p *ParticipantImpl) IssueFullReconnect(reason types.ParticipantCloseReason
|
|||||||
|
|
||||||
func (p *ParticipantImpl) onPublicationError(trackID livekit.TrackID) {
|
func (p *ParticipantImpl) onPublicationError(trackID livekit.TrackID) {
|
||||||
if p.params.ReconnectOnPublicationError {
|
if p.params.ReconnectOnPublicationError {
|
||||||
p.params.Logger.Infow("issuing full reconnect on publication error", "trackID", trackID)
|
p.pubLogger.Infow("issuing full reconnect on publication error", "trackID", trackID)
|
||||||
p.IssueFullReconnect(types.ParticipantCloseReasonPublicationError)
|
p.IssueFullReconnect(types.ParticipantCloseReasonPublicationError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2186,7 +2193,7 @@ func (p *ParticipantImpl) onSubscriptionError(trackID livekit.TrackID, fatal boo
|
|||||||
})
|
})
|
||||||
|
|
||||||
if p.params.ReconnectOnSubscriptionError && fatal {
|
if p.params.ReconnectOnSubscriptionError && fatal {
|
||||||
p.params.Logger.Infow("issuing full reconnect on subscription error", "trackID", trackID)
|
p.subLogger.Infow("issuing full reconnect on subscription error", "trackID", trackID)
|
||||||
p.IssueFullReconnect(types.ParticipantCloseReasonSubscriptionError)
|
p.IssueFullReconnect(types.ParticipantCloseReasonSubscriptionError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2201,7 +2208,7 @@ func (p *ParticipantImpl) onAnyTransportNegotiationFailed() {
|
|||||||
func (p *ParticipantImpl) UpdateSubscribedQuality(nodeID livekit.NodeID, trackID livekit.TrackID, maxQualities []types.SubscribedCodecQuality) error {
|
func (p *ParticipantImpl) UpdateSubscribedQuality(nodeID livekit.NodeID, trackID livekit.TrackID, maxQualities []types.SubscribedCodecQuality) error {
|
||||||
track := p.GetPublishedTrack(trackID)
|
track := p.GetPublishedTrack(trackID)
|
||||||
if track == nil {
|
if track == nil {
|
||||||
p.params.Logger.Warnw("could not find track", nil, "trackID", trackID)
|
p.pubLogger.Warnw("could not find track", nil, "trackID", trackID)
|
||||||
return errors.New("could not find published track")
|
return errors.New("could not find published track")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2212,7 +2219,7 @@ func (p *ParticipantImpl) UpdateSubscribedQuality(nodeID livekit.NodeID, trackID
|
|||||||
func (p *ParticipantImpl) UpdateMediaLoss(nodeID livekit.NodeID, trackID livekit.TrackID, fractionalLoss uint32) error {
|
func (p *ParticipantImpl) UpdateMediaLoss(nodeID livekit.NodeID, trackID livekit.TrackID, fractionalLoss uint32) error {
|
||||||
track := p.GetPublishedTrack(trackID)
|
track := p.GetPublishedTrack(trackID)
|
||||||
if track == nil {
|
if track == nil {
|
||||||
p.params.Logger.Warnw("could not find track", nil, "trackID", trackID)
|
p.pubLogger.Warnw("could not find track", nil, "trackID", trackID)
|
||||||
return errors.New("could not find published track")
|
return errors.New("could not find published track")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-3
@@ -27,6 +27,7 @@ import (
|
|||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
|
|
||||||
"github.com/livekit/livekit-server/pkg/sfu/connectionquality"
|
"github.com/livekit/livekit-server/pkg/sfu/connectionquality"
|
||||||
|
sutils "github.com/livekit/livekit-server/pkg/utils"
|
||||||
"github.com/livekit/protocol/livekit"
|
"github.com/livekit/protocol/livekit"
|
||||||
"github.com/livekit/protocol/logger"
|
"github.com/livekit/protocol/logger"
|
||||||
"github.com/livekit/protocol/utils"
|
"github.com/livekit/protocol/utils"
|
||||||
@@ -113,9 +114,13 @@ func NewRoom(
|
|||||||
egressLauncher EgressLauncher,
|
egressLauncher EgressLauncher,
|
||||||
) *Room {
|
) *Room {
|
||||||
r := &Room{
|
r := &Room{
|
||||||
protoRoom: proto.Clone(room).(*livekit.Room),
|
protoRoom: proto.Clone(room).(*livekit.Room),
|
||||||
internal: internal,
|
internal: internal,
|
||||||
Logger: LoggerWithRoom(logger.GetLogger(), livekit.RoomName(room.Name), livekit.RoomID(room.Sid)),
|
Logger: LoggerWithRoom(
|
||||||
|
logger.GetLogger().WithComponent(sutils.ComponentRoom),
|
||||||
|
livekit.RoomName(room.Name),
|
||||||
|
livekit.RoomID(room.Sid),
|
||||||
|
),
|
||||||
config: config,
|
config: config,
|
||||||
audioConfig: audioConfig,
|
audioConfig: audioConfig,
|
||||||
telemetry: telemetry,
|
telemetry: telemetry,
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import (
|
|||||||
|
|
||||||
"github.com/livekit/livekit-server/version"
|
"github.com/livekit/livekit-server/version"
|
||||||
"github.com/livekit/protocol/livekit"
|
"github.com/livekit/protocol/livekit"
|
||||||
"github.com/livekit/protocol/logger"
|
|
||||||
"github.com/livekit/protocol/webhook"
|
"github.com/livekit/protocol/webhook"
|
||||||
|
|
||||||
"github.com/livekit/livekit-server/pkg/config"
|
"github.com/livekit/livekit-server/pkg/config"
|
||||||
@@ -43,9 +42,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
config.InitLoggerFromConfig(config.LoggingConfig{
|
config.InitLoggerFromConfig(&config.DefaultConfig.Logging)
|
||||||
Config: logger.Config{Level: "debug"},
|
|
||||||
})
|
|
||||||
// allow immediate closure in testing
|
// allow immediate closure in testing
|
||||||
RoomDepartureGrace = 1
|
RoomDepartureGrace = 1
|
||||||
roomUpdateInterval = defaultDelay
|
roomUpdateInterval = defaultDelay
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import (
|
|||||||
"github.com/pion/webrtc/v3"
|
"github.com/pion/webrtc/v3"
|
||||||
"go.uber.org/atomic"
|
"go.uber.org/atomic"
|
||||||
|
|
||||||
|
sutils "github.com/livekit/livekit-server/pkg/utils"
|
||||||
"github.com/livekit/protocol/livekit"
|
"github.com/livekit/protocol/livekit"
|
||||||
"github.com/livekit/protocol/logger"
|
"github.com/livekit/protocol/logger"
|
||||||
|
|
||||||
@@ -64,7 +65,7 @@ type SubscribedTrack struct {
|
|||||||
func NewSubscribedTrack(params SubscribedTrackParams) *SubscribedTrack {
|
func NewSubscribedTrack(params SubscribedTrackParams) *SubscribedTrack {
|
||||||
s := &SubscribedTrack{
|
s := &SubscribedTrack{
|
||||||
params: params,
|
params: params,
|
||||||
logger: params.Subscriber.GetLogger().WithValues(
|
logger: params.Subscriber.GetLogger().WithComponent(sutils.ComponentSub).WithValues(
|
||||||
"trackID", params.DownTrack.ID(),
|
"trackID", params.DownTrack.ID(),
|
||||||
"publisherID", params.PublisherID,
|
"publisherID", params.PublisherID,
|
||||||
"publisher", params.PublisherIdentity,
|
"publisher", params.PublisherIdentity,
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import (
|
|||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"go.uber.org/atomic"
|
"go.uber.org/atomic"
|
||||||
|
|
||||||
|
sutils "github.com/livekit/livekit-server/pkg/utils"
|
||||||
"github.com/livekit/protocol/livekit"
|
"github.com/livekit/protocol/livekit"
|
||||||
"github.com/livekit/protocol/logger"
|
"github.com/livekit/protocol/logger"
|
||||||
"github.com/livekit/protocol/logger/pionlogger"
|
"github.com/livekit/protocol/logger/pionlogger"
|
||||||
@@ -391,7 +392,7 @@ func NewPCTransport(params TransportParams) (*PCTransport, error) {
|
|||||||
if params.IsSendSide {
|
if params.IsSendSide {
|
||||||
t.streamAllocator = streamallocator.NewStreamAllocator(streamallocator.StreamAllocatorParams{
|
t.streamAllocator = streamallocator.NewStreamAllocator(streamallocator.StreamAllocatorParams{
|
||||||
Config: params.CongestionControlConfig,
|
Config: params.CongestionControlConfig,
|
||||||
Logger: params.Logger,
|
Logger: params.Logger.WithComponent(sutils.ComponentCongestionControl),
|
||||||
})
|
})
|
||||||
t.streamAllocator.Start()
|
t.streamAllocator.Start()
|
||||||
t.pacer = pacer.NewPassThrough(params.Logger)
|
t.pacer = pacer.NewPassThrough(params.Logger)
|
||||||
|
|||||||
@@ -335,7 +335,11 @@ func (r *RoomManager) StartSession(
|
|||||||
rtcConf := *r.rtcConfig
|
rtcConf := *r.rtcConfig
|
||||||
rtcConf.SetBufferFactory(room.GetBufferFactory())
|
rtcConf.SetBufferFactory(room.GetBufferFactory())
|
||||||
sid := livekit.ParticipantID(utils.NewGuid(utils.ParticipantPrefix))
|
sid := livekit.ParticipantID(utils.NewGuid(utils.ParticipantPrefix))
|
||||||
pLogger := rtc.LoggerWithParticipant(room.Logger, pi.Identity, sid, false)
|
pLogger := rtc.LoggerWithParticipant(
|
||||||
|
rtc.LoggerWithRoom(logger.GetLogger(), room.Name(), room.ID()),
|
||||||
|
pi.Identity,
|
||||||
|
sid,
|
||||||
|
false)
|
||||||
// default allow forceTCP
|
// default allow forceTCP
|
||||||
allowFallback := true
|
allowFallback := true
|
||||||
if r.config.RTC.AllowTCPFallback != nil {
|
if r.config.RTC.AllowTCPFallback != nil {
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ import (
|
|||||||
|
|
||||||
"github.com/livekit/livekit-server/pkg/config"
|
"github.com/livekit/livekit-server/pkg/config"
|
||||||
"github.com/livekit/livekit-server/pkg/routing"
|
"github.com/livekit/livekit-server/pkg/routing"
|
||||||
|
sutils "github.com/livekit/livekit-server/pkg/utils"
|
||||||
"github.com/livekit/livekit-server/version"
|
"github.com/livekit/livekit-server/version"
|
||||||
"github.com/livekit/protocol/auth"
|
"github.com/livekit/protocol/auth"
|
||||||
"github.com/livekit/protocol/livekit"
|
"github.com/livekit/protocol/livekit"
|
||||||
@@ -102,7 +103,7 @@ func NewLivekitServer(conf *config.Config,
|
|||||||
middlewares = append(middlewares, NewAPIKeyAuthMiddleware(keyProvider))
|
middlewares = append(middlewares, NewAPIKeyAuthMiddleware(keyProvider))
|
||||||
}
|
}
|
||||||
|
|
||||||
twirpLoggingHook := TwirpLogger(logger.GetLogger())
|
twirpLoggingHook := TwirpLogger(logger.GetLogger().WithComponent(sutils.ComponentAPI))
|
||||||
twirpRequestStatusHook := TwirpRequestStatusReporter()
|
twirpRequestStatusHook := TwirpRequestStatusReporter()
|
||||||
roomServer := livekit.NewRoomServiceServer(roomService, twirpLoggingHook)
|
roomServer := livekit.NewRoomServiceServer(roomService, twirpLoggingHook)
|
||||||
egressServer := livekit.NewEgressServer(egressService, twirp.WithServerHooks(
|
egressServer := livekit.NewEgressServer(egressService, twirp.WithServerHooks(
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import (
|
|||||||
"go.uber.org/atomic"
|
"go.uber.org/atomic"
|
||||||
|
|
||||||
"github.com/livekit/livekit-server/pkg/sfu/audio"
|
"github.com/livekit/livekit-server/pkg/sfu/audio"
|
||||||
|
sutils "github.com/livekit/livekit-server/pkg/utils"
|
||||||
"github.com/livekit/mediatransportutil"
|
"github.com/livekit/mediatransportutil"
|
||||||
"github.com/livekit/mediatransportutil/pkg/bucket"
|
"github.com/livekit/mediatransportutil/pkg/bucket"
|
||||||
"github.com/livekit/mediatransportutil/pkg/nack"
|
"github.com/livekit/mediatransportutil/pkg/nack"
|
||||||
@@ -124,7 +125,7 @@ func NewBuffer(ssrc uint32, vp, ap *sync.Pool) *Buffer {
|
|||||||
videoPool: vp,
|
videoPool: vp,
|
||||||
audioPool: ap,
|
audioPool: ap,
|
||||||
pliThrottle: int64(500 * time.Millisecond),
|
pliThrottle: int64(500 * time.Millisecond),
|
||||||
logger: l,
|
logger: l.WithComponent(sutils.ComponentPub).WithComponent(sutils.ComponentSFU),
|
||||||
}
|
}
|
||||||
b.extPackets.SetMinCapacity(7)
|
b.extPackets.SetMinCapacity(7)
|
||||||
return b
|
return b
|
||||||
@@ -134,9 +135,9 @@ func (b *Buffer) SetLogger(logger logger.Logger) {
|
|||||||
b.Lock()
|
b.Lock()
|
||||||
defer b.Unlock()
|
defer b.Unlock()
|
||||||
|
|
||||||
b.logger = logger
|
b.logger = logger.WithComponent(sutils.ComponentSFU)
|
||||||
if b.rtpStats != nil {
|
if b.rtpStats != nil {
|
||||||
b.rtpStats.SetLogger(logger)
|
b.rtpStats.SetLogger(b.logger)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2023 LiveKit, Inc
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package utils
|
||||||
|
|
||||||
|
const (
|
||||||
|
ComponentPub = "pub"
|
||||||
|
ComponentSub = "sub"
|
||||||
|
ComponentRoom = "room"
|
||||||
|
ComponentAPI = "api"
|
||||||
|
ComponentTransport = "transport"
|
||||||
|
ComponentSFU = "sfu"
|
||||||
|
// transport subcomponents
|
||||||
|
ComponentCongestionControl = "cc"
|
||||||
|
)
|
||||||
@@ -55,9 +55,7 @@ const (
|
|||||||
var roomClient livekit.RoomService
|
var roomClient livekit.RoomService
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
config.InitLoggerFromConfig(config.LoggingConfig{
|
config.InitLoggerFromConfig(&config.DefaultConfig.Logging)
|
||||||
Config: logger.Config{Level: "debug"},
|
|
||||||
})
|
|
||||||
|
|
||||||
prometheus.Init("test", livekit.NodeType_SERVER, "test")
|
prometheus.Init("test", livekit.NodeType_SERVER, "test")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user