Skip to content

Commit 8ad7b34

Browse files
authored
[common-go] force set configcat log level to error (#17067)
1 parent 212f565 commit 8ad7b34

File tree

1 file changed

+4
-1
lines changed
  • components/common-go/experiments

1 file changed

+4
-1
lines changed

components/common-go/experiments/types.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212

1313
configcat "github.com/configcat/go-sdk/v7"
1414
"github.com/gitpod-io/gitpod/common-go/log"
15+
"github.com/sirupsen/logrus"
1516
)
1617

1718
type Client interface {
@@ -65,11 +66,13 @@ func NewClient(opts ...ClientOpt) Client {
6566
if opt.sdkKey == "" {
6667
return NewAlwaysReturningDefaultValueClient()
6768
}
69+
logger := log.Log.Dup()
70+
logger.Logger.SetLevel(logrus.ErrorLevel)
6871
return newConfigCatClient(configcat.Config{
6972
SDKKey: opt.sdkKey,
7073
BaseURL: opt.baseURL,
7174
PollInterval: opt.pollInterval,
7275
HTTPTimeout: 3 * time.Second,
73-
Logger: &configCatLogger{log.Log},
76+
Logger: &configCatLogger{logger},
7477
})
7578
}

0 commit comments

Comments
 (0)