LK logger with context in SFU (#391)

* LK logger with context in SFU

* Move buff.SetLogger into sfu.WebRTCReceiver
This commit is contained in:
Raja Subramanian
2022-02-01 08:57:09 +05:30
committed by GitHub
parent 3d132730f9
commit 9db2bd22df
12 changed files with 46 additions and 50 deletions
+1 -5
View File
@@ -3,14 +3,12 @@ package serverlogger
import (
"github.com/go-logr/logr"
"github.com/go-logr/zapr"
"github.com/livekit/protocol/logger"
"github.com/pion/logging"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"github.com/livekit/livekit-server/pkg/config"
"github.com/livekit/livekit-server/pkg/sfu"
"github.com/livekit/livekit-server/pkg/sfu/buffer"
"github.com/livekit/protocol/logger"
)
var (
@@ -42,8 +40,6 @@ func (f *LoggerFactory) NewLogger(scope string) logging.LeveledLogger {
// Note: only pass in logr.Logger with default depth
func SetLogger(l logr.Logger) {
logger.SetLogger(l, "livekit")
sfu.Logger = l.WithName("sfu")
buffer.Logger = sfu.Logger
}
func InitFromConfig(config config.LoggingConfig) {