diff --git a/pkg/rtc/room_test.go b/pkg/rtc/room_test.go index 4f76d0705..23330652d 100644 --- a/pkg/rtc/room_test.go +++ b/pkg/rtc/room_test.go @@ -51,7 +51,11 @@ const ( ) func init() { - config.InitLoggerFromConfig(&config.DefaultConfig.Logging) + // the logger keeps this pointer, so it needs storage of its own: NewConfig + // yaml-marshals DefaultConfig, which reflectively copies the leveler's mutex + // while pion goroutines are locking it. + logging := config.LoggingConfig{PionLevel: config.DefaultConfig.Logging.PionLevel} + config.InitLoggerFromConfig(&logging) roomUpdateInterval = defaultDelay } diff --git a/test/integration_helpers.go b/test/integration_helpers.go index ec3469620..ba71c0560 100644 --- a/test/integration_helpers.go +++ b/test/integration_helpers.go @@ -63,7 +63,11 @@ const ( var roomClient livekit.RoomService func init() { - config.InitLoggerFromConfig(&config.DefaultConfig.Logging) + // the logger keeps this pointer, so it needs storage of its own: NewConfig + // yaml-marshals DefaultConfig, which reflectively copies the leveler's mutex + // while pion goroutines are locking it. + logging := config.LoggingConfig{PionLevel: config.DefaultConfig.Logging.PionLevel} + config.InitLoggerFromConfig(&logging) prometheus.Init("test", livekit.NodeType_SERVER) }