News for hackers. Stuff that matters.
Re:Go 1.21 Released by morelisp on Thursday August 10, 2023 @05:14PM (#37081881)
But you've offered no actual criteria why the API is bad! Again, most logging users want something to handle nested record contexts for them and per-level methods, most logging implementers want a minimum number of entry points, and that's exactly what this API offers. (It's definitely not zerolog-style where it sacrifices ease of use for performance.)
Re:Go 1.21 Released by kiitos on Thursday August 10, 2023 @10:08PM (#37084269)
Structured logging means logging where discrete events are sets of key=val pairs, and nothing more.

What is a record context? What is a level? These are concepts built on top of a structured logger, which manifest as specific key=val pairs in a given structured log event. They don't need -- and shouldn't have! -- first-order representation in a low-level structured logger API.

What is an entry point? If I'm writing some structured logger implementation, I expect that I should need to provide precisely one method:

    func (x *MyThing) Log(<set of key=val pairs>) error
Anything more is cruft.