From 624b3116d88f1f603dd430e0cff7522f40a99371 Mon Sep 17 00:00:00 2001 From: Thiago Caiubi Date: Tue, 18 Sep 2018 11:57:53 -0300 Subject: [PATCH] Fix sub-logger by context example (#106) Not quite sure but looks like the example is using the wrong API. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")