zap icon indicating copy to clipboard operation
zap copied to clipboard

zapslog: Move to root Zap module

Open galecore opened this issue 3 years ago • 7 comments

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

galecore avatar Apr 09 '23 15:04 galecore

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 :)

sywhang avatar Apr 11 '23 18:04 sywhang

It seems that there is some license problem: https://pkg.go.dev/go.uber.org/zap/[email protected]/zapslog

AlekSi avatar Jun 30 '23 11:06 AlekSi

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?

jba avatar Aug 02 '23 10:08 jba

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.

sywhang avatar Aug 03 '23 16:08 sywhang

Go 1.21 was out! 🎉

vvakame avatar Aug 16 '23 03:08 vvakame

And the blog post about slog is out too: https://go.dev/blog/slog

AlekSi avatar Aug 22 '23 17:08 AlekSi

Turning this into an issue to move zapslog out of exp. I've created #1333 to track what remains for zapslog to be stabilized.

abhinav avatar Aug 23 '23 12:08 abhinav