Fix sub-logger by context example (#106)

Not quite sure but looks like the example is using the wrong API.
This commit is contained in:
Thiago Caiubi 2018-09-18 11:57:53 -03:00 committed by Olivier Poitrey
parent 785a567b10
commit 624b3116d8
1 changed files with 1 additions and 1 deletions

View File

@ -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")