Skip to content

Commit bde844b

Browse files
authored
[common-go] fix incorrect log level (#19083)
1 parent a290b8b commit bde844b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

components/common-go/experiments/configcat.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ func (l *configCatLogger) GetLevel() configcat.LogLevel {
106106
return configcat.LogLevelError
107107
}
108108

109+
func (l *configCatLogger) Debugf(format string, args ...interface{}) {}
110+
func (l *configCatLogger) Infof(format string, args ...interface{}) {}
111+
func (l *configCatLogger) Warnf(format string, args ...interface{}) {}
112+
109113
func logField(experimentName, value interface{}) logrus.Fields {
110114
return logrus.Fields{
111115
fmt.Sprintf("experiments.%s", experimentName): value,

components/common-go/experiments/types.go

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

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

1817
type Client interface {
@@ -90,13 +89,11 @@ func NewClient(opts ...ClientOpt) Client {
9089
}
9190
return NewAlwaysReturningDefaultValueClient()
9291
}
93-
logger := log.Log.Dup()
94-
logger.Logger.SetLevel(logrus.ErrorLevel)
9592
return newConfigCatClient(configcat.Config{
9693
SDKKey: opt.sdkKey,
9794
BaseURL: opt.baseURL,
9895
PollInterval: opt.pollInterval,
9996
HTTPTimeout: 3 * time.Second,
100-
Logger: &configCatLogger{logger},
97+
Logger: &configCatLogger{log.Log},
10198
})
10299
}

0 commit comments

Comments
 (0)