diff --git a/README.md b/README.md index 19d87fa..91c75f0 100644 --- a/README.md +++ b/README.md @@ -364,7 +364,7 @@ hooked.Warn().Msg("") ### Pass a sub-logger by context ```go -ctx := log.With("component", "module").Logger().WithContext(ctx) +ctx := log.With().Str("component", "module").Logger().WithContext(ctx) log.Ctx(ctx).Info().Msg("hello world")