Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
ben0x539
2y ago
0 comments
Share
I think go loggers have tried to move away from passing log entries as maps for performance reasons.
0 comments
default
newest
oldest
mlhpdx
2y ago
That seems like a problem that should be solved. Logging structured data is a very basic expectation.
infogulch
2y ago
This is structured logging. Stubbornly insisting that "structured logging" === "map" is dumb and ignores a large fraction of use cases where performance matters.
mlhpdx
2y ago
Are there languages that solve the “performance“ problem with maps? In fact, isn’t Go one of them?
1 more reply
yencabulator
2y ago
Avoiding the map allocation & construction cost is way harder than avoiding the use of a map, like zap and slog.LogAttrs do.
j
/
k
navigate · click thread line to collapse