I’ve been using slog a bit, and I like it overall. That said, I hope that slog quickly adds a simple way to adjust the call depth level to make it easier to write helper functions. E.g., something like log.Output. At the moment, you can adjust the call depth level, but it requires a fair amount of manual knob-turning.
slog is what I’d hoped the standard lib logger would have been when I started writing go. It has a few rough edges, but I’m hopeful that it’ll be added to the standard lib after some ironing.
I’ve been using slog a bit, and I like it overall. That said, I hope that slog quickly adds a simple way to adjust the call depth level to make it easier to write helper functions. E.g., something like
log.Output
. At the moment, you can adjust the call depth level, but it requires a fair amount of manual knob-turning.slog is what I’d hoped the standard lib logger would have been when I started writing go. It has a few rough edges, but I’m hopeful that it’ll be added to the standard lib after some ironing.
The proposal has been accepted already, and slog seems likely to enter the standard library soon (1.21?) with very few changes. See this link and here’s the initial commit to the standard library.
Neat!