News for hackers. Stuff that matters.
Re:Go 1.21 by showdeddd on Wednesday June 21, 2023 @04:45PM (#36424183)
I wonder if the new stdlib logger is featured enough to get rid of logrus/zerolog.
Re:Go 1.21 by JyB on Wednesday June 21, 2023 @05:03PM (#36424474)
I'm wondering the same. Anyone already played for some time with the pkg?
Re:Go 1.21 by richieartoul on Wednesday June 21, 2023 @06:03PM (#36425300)
I've been using it for a few weeks now. Overall pretty happy with it. Has good default API, and can be basically arbitrarily extended as needed. We even have a custom handler implementation that allows us to assert on specific logs being emitted in our stress/fuzz testing.
Re:Go 1.21 by xh-dude on Wednesday June 21, 2023 @07:37PM (#36426257)
There’s been an emphasis in slog on Handler composition over directly implementing a ton of features. Personally I love it - there are things I’ve needed, that slog can do, that few other loggers make easy/possible.

Zerolog will still be relevant for raw performance (slog is close to zap on perf - doesn’t win benchmarks, doesn’t look out of place either), fewer really need it but some really do.