Re:Go 1.21 Released
by badrequest on Tuesday August 08, 2023 @04:17PM
(#37054907)
I've seen the API, and it's not either of those things if you've already used a structured logger?
[ Parent
| on HN ]
I've never seen a structured logging library with concepts like Attrs, Groups, or Records like those defined by slog.
Re:Go 1.21 Released
by yencabulator on Saturday August 12, 2023 @05:45PM
(#37104520)
Attr is the same concept as https://pkg.go.dev/go.uber.org/zap#Field
, and Zap pioneered this whole field.
Group is pretty much https://pkg.go.dev/go.uber.org/zap#Namespace
Record is the interface to log sinks, not something the typical programmer worries about.
Haha, zap did not pioneer anything, what are you talking about.
Re:Go 1.21 Released
by yencabulator on Sunday August 13, 2023 @12:27PM
(#37111411)
"Haha", great attitude dissing other people's work. https://news.ycombinator.com/newsguidelines.html
What Go structured logging libraries predate Zap's 2016 creation? Only one I can remember is Logrus, which was using type Fields map[string]interface{}, the bad qualities of which are kinda the whole reason for Zap's creation, and slog follows the Zap-style API[1].
[1]: Though ignoring many of the optimizations..