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:
@@ -29,7 +29,6 @@ import (
|
||||
|
||||
"github.com/livekit/mediatransportutil/pkg/rtcconfig"
|
||||
"github.com/livekit/protocol/logger"
|
||||
"github.com/livekit/protocol/logger/pionlogger"
|
||||
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 {
|
||||
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 {
|
||||
conf.Environment = "dev"
|
||||
@@ -818,7 +824,6 @@ func SetLogger(l logger.Logger) {
|
||||
logger.SetLogger(l, "livekit")
|
||||
}
|
||||
|
||||
func InitLoggerFromConfig(config LoggingConfig) {
|
||||
pionlogger.SetLogLevel(config.PionLevel)
|
||||
logger.InitFromConfig(config.Config, "livekit")
|
||||
func InitLoggerFromConfig(config *LoggingConfig) {
|
||||
logger.InitFromConfig(&config.Config, "livekit")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user