slogx icon indicating copy to clipboard operation
slogx copied to clipboard

a better wrapper

Open ttys3 opened this issue 2 years ago • 3 comments

since slog api changed, and has WithContext method and Ctx method removed, and add some bad InfoCtx like method.

we need a better wrapper.

ttys3 avatar Mar 25 '23 19:03 ttys3

something like:

slogsimple.setup()

logger := slogsimple.New()

log := logger.Ctx(ctx)

log.Info()

log.Error()

ttys3 avatar Mar 25 '23 19:03 ttys3

https://github.com/golang/go/issues/58243

https://github.com/golang/go/issues/56345

https://github.com/golang/go/discussions/54763

ttys3 avatar Mar 25 '23 19:03 ttys3

trace_id in log:

image

ttys3 avatar Aug 10 '23 13:08 ttys3