zapslog: Move to root Zap module
Hello, Uber Zap team and community!
Fellow gophers might know that the proposal on https://pkg.go.dev/golang.org/x/exp/slog was accepted, and slog will soon appear in the standard library.
I wrote an extension library for slog handlers, and a handler for zap is in it! I would greatly appreciate your feedback on the code - https://github.com/galecore/xslog
I hope that Uber Zap team would also be interested in probably re-using this code in the future, when slog will become a staple of logging for golang applications.
Let me know what you think,
Tim
Hey @galecore!
Thanks for raising this issue. I took a cursory look at your library and we have something similar already. Check out https://github.com/uber-go/zap/tree/master/exp/zapslog from https://github.com/uber-go/zap/pull/1246 :)
It seems that there is some license problem: https://pkg.go.dev/go.uber.org/zap/[email protected]/zapslog
Hi Zap team, slog author here. Go 1.21 will be out soon, and log/slog will be in it. I would love it if you could give some attention to zapslog to make sure it works with the latest version of slog (at a minimum, changing the import path).
And what do you think about moving it out of your exp tree into some place more permanent/official?
Hello @jba , master branch currently tracks latest version of slog with #1314 and #1315.
Once Go 1.21 is out, we can consider moving it out of exp/ tree to the top-level package.
Go 1.21 was out! 🎉
And the blog post about slog is out too: https://go.dev/blog/slog
Turning this into an issue to move zapslog out of exp. I've created #1333 to track what remains for zapslog to be stabilized.