Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 296 Bytes

README.md

File metadata and controls

15 lines (10 loc) · 296 Bytes

GoAPITemplate

Log Context

The thing that gives logging a separate context is the function call:

logger := gologger.NewLogger()
// ...
ctx = logger.WithContext(ctx)

Otherwise all logging will share the context (weird I know).

From here you can use logger := zerolog.Ctx(ctx)