fix: resolved comments

This commit is contained in:
mayur.popli
2025-03-26 10:42:56 +05:30
parent f8ffe0793d
commit 708f9485cb
2 changed files with 5 additions and 5 deletions

View File

@@ -51,7 +51,7 @@ var logLevels = map[Level]zerolog.Level{
type Config struct { type Config struct {
Level Level `yaml:"level"` Level Level `yaml:"level"`
Destinations []Destination `yaml:"destinations"` Destinations []Destination `yaml:"destinations"`
ContextKeys []any `yaml:"contextKeys"` ContextKeys []string `yaml:"contextKeys"`
} }
var ( var (
@@ -255,7 +255,7 @@ func addCtx(ctx context.Context, event *zerolog.Event) {
if !ok { if !ok {
continue continue
} }
keyStr := key.(string) keyStr := key
event.Any(keyStr, val) event.Any(keyStr, val)
} }
} }

View File

@@ -43,7 +43,7 @@ func setupLogger(t *testing.T, l Level) string {
}, },
}, },
}, },
ContextKeys: []any{"userID", "requestID"}, ContextKeys: []string{"userID", "requestID"},
} }
err = InitLogger(config) err = InitLogger(config)
if err != nil { if err != nil {