4 ms·
Pretty good article. One comment: it recommends zerolog for logging, but recently slog [1] has started to become part of the standard lib. I guess it’s the futu
by rollulus 3y ago
Pretty good article. One comment: it recommends zerolog for logging, but recently slog [1] has started to become part of the standard lib. I guess it’s the future.
[1]: https://pkg.go.dev/golang.org/x/exp/slog https://pkg.go.dev/golang.org/x/exp/slog
- arp242 3y agoI used slog for a project a few months ago; then I stopped working on it and continued on it a few weeks ago and there were all sorts of incompatible changes. That's completely fair; it's still in development so this isn't a complaint! But just saying, at this point you need to be prepared to have to deal with that.
- xh-dude 3y agoFWIW: slog has been pretty stable for a month or two, and should be officially standard library in go1.21 There was a last round of changes mostly revisiting use of contexts a few months ago - hats off to jba for taking a lot of time to work out the best fit
- wizhi 3y agoWhere do you keep up to date on what will be included in future releases?
- roesl027 3y agoA few places I look: - https://dev.golang.org/release#Go1.21 https://dev.golang.org/release#Go1.21 - might be the same info as https://github.com/golang/go/milestone/279 https://github.com/golang/go/milestone/279 in a different form and here is a link to the draft release notes https://tip.golang.org/doc/go1.21 https://tip.golang.org/doc/go1.21
- liampulles 3y agoI use zerolog at work - I can vouch that it does the job just fine.
- Groxx 3y agoInteresting. Though bleh, I would LOVE it if Go would stop releasing things like this with global default values - it leads to tons of libraries not building a way to pass in specific loggers. Better to cut that off at the head.