slogx
slogx copied to clipboard
a better wrapper
since slog api changed, and has WithContext method and Ctx method removed, and add some bad InfoCtx like method.
we need a better wrapper.
something like:
slogsimple.setup()
logger := slogsimple.New()
log := logger.Ctx(ctx)
log.Info()
log.Error()
https://github.com/golang/go/issues/58243
https://github.com/golang/go/issues/56345
https://github.com/golang/go/discussions/54763
trace_id in log: