fix: resolved comments
This commit is contained in:
@@ -51,7 +51,7 @@ var logLevels = map[Level]zerolog.Level{
|
||||
type Config struct {
|
||||
Level Level `yaml:"level"`
|
||||
Destinations []Destination `yaml:"destinations"`
|
||||
ContextKeys []any `yaml:"contextKeys"`
|
||||
ContextKeys []string `yaml:"contextKeys"`
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -255,7 +255,7 @@ func addCtx(ctx context.Context, event *zerolog.Event) {
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
keyStr := key.(string)
|
||||
keyStr := key
|
||||
event.Any(keyStr, val)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ func setupLogger(t *testing.T, l Level) string {
|
||||
},
|
||||
},
|
||||
},
|
||||
ContextKeys: []any{"userID", "requestID"},
|
||||
ContextKeys: []string{"userID", "requestID"},
|
||||
}
|
||||
err = InitLogger(config)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user