We propose a new package providing structured logging with levels. Structured logging adds key-value pairs to a human-readable output message to enable fast, accurate processing of large amounts of log data.
See the design doc for details.
fsouza, zephyrtronium, r5sec5cyl, willfaught, AndrewHarrisSPU, carlmjohnson, gilcrest, wdvxdr1123, komuw, rverton, and 138 more reacted with thumbs up emoji
tdakkota, mrwormhole, aea7, 08d2, nahwinrajan, zxysilent, salehmu, and blissd reacted with thumbs down emoji
septemhill, fsouza, smlx, r5sec5cyl, gilcrest, hnakamur, bytheway, collinforsyth, mikeschinkel, cypres, and 12 more reacted with hooray emoji
ericlagergren, IAmSurajBobade, gjkim42, ainar-g, tonyhb, xremming, wzshiming, mkungla, vediatoni, and mosmartin reacted with eyes emoji
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This is a huge API surface without any real production testing (AIUI). Perhaps it might be better to land it under golang.org/x for some time? Eg, like context, xerrors changes.
aarzilli, fsouza, flibustenet, prochac, deefdragon, icholy, xdorro, komuw, BerkeleyTrue, ainar-g, and 8 more reacted with thumbs up emoji
ysomad, dbirks, lanrat, bigwhite, BerkeleyTrue, EwenQuim, fess932, jochumdev, cristaloleg, shadyabhi, and 13 more reacted with hooray emoji
This comment has been hidden.
I love most of what this does, but I don't support its addition as it stands. Specifically, I have issues with the option to use inline key-value pairs in the log calls. I believe the attributes system alone is fine. Logging does not need the breakage that key-value args like that allow.
The complexity in the documentation around Log should be a warning sign.
...
The attribute arguments are processed as follows:
If an argument is an Attr, it is used as is.
If an argument is a string and this is not the last argument, the following argument is treated as the value a
(read more)