News for hackers. Stuff that matters.
Re:Structured Logging with Slog by johnmaguire on Tuesday August 22, 2023 @05:23PM (#37228705)
It sure has maps though... logrus famously uses `logrus.Fields{"key": "value"}`
Re:Structured Logging with Slog by morelisp on Tuesday August 22, 2023 @05:38PM (#37228860)
And logrus is one of the slowest loggers by far, in part because of its heavy map usage.
Re:Structured Logging with Slog by dgsb on Wednesday August 23, 2023 @02:46AM (#37232587)
It's also the reflect on the value part which slows down things. It could be improved but it's hard to do that without breaking interface. It's so widely used that a major bump wouldn't that useful.
Re:Structured Logging with Slog by JonChesterfield on Wednesday August 23, 2023 @06:38AM (#37233985)
I'd expect it to be mostly called on map literals, at least a compile time constant set of keys. That should be amenable to a targeted compiler optimisation.