3 ms·
I've seen the API, and it's not either of those things if you've already used a structured logger?
by badrequest 3y ago
I've seen the API, and it's not either of those things if you've already used a structured logger?
- kiitos 3y agoI've never seen a structured logging library with concepts like Attrs, Groups, or Records like those defined by slog.
- yencabulator 3y agoAttr is the same concept as https://pkg.go.dev/go.uber.org/zap#Field 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 https://pkg.go.dev/go.uber.org/zap#Namespace Record is the interface to log sinks, not something the typical programmer worries about.
- kiitos 3y agoHaha, zap did not pioneer anything, what are you talking about.
- yencabulator 3y ago"Haha", great attitude dissing other people's work. https://news.ycombinator.com/newsguidelines.html 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..