We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5556c65 commit b6e8b86Copy full SHA for b6e8b86
error_test.go
@@ -915,6 +915,8 @@ func ExampleError_LogValue() {
915
)
916
917
// The error implements slog.LogValuer interface automatically
918
+ // When err is passed to a slog logger (e.g. via slog.Any("error", err)), its LogValue() method is called automatically.
919
+ // We can inspect the returned slog.Value for demonstration.
920
logValue := err.LogValue()
921
922
// Extract some information from the log value for demonstration
0 commit comments