Open samber opened 1 year ago
@knz @dhartunian Hi maintainers! I've recently implemented the slog.LogValuer feature in our project. I'd appreciate your input on the code quality, documentation, and any potential improvements. Please feel free to comment whenever you have time. Thank you! https://github.com/cockroachdb/errors/pull/129
The new slog library provides a
slog.LogValuer
interface for formatting attributes.Documentation here: https://pkg.go.dev/golang.org/x/exp/slog#hdr-Customizing_a_type_s_logging_behavior
I think cockroachdb/errors should implement it.
slog
will be released in go 1.21. But is already available andgolang.org/x/exp/slog