Skip to content

danthegoodman1/GoAPITemplate

Repository files navigation

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)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published