Files
containerd/pkg/tracing
Sebastiaan van Stijn c7ffd8b006 pkg/tracing: handle error and typed-nil Stringer attributes
Log fields which contain an error currently fall through to JSON
marshaling, which may produce an unhelpful value such as "{}" instead
of the error message.

Handle error values explicitly and use fmt.Sprint when formatting error
and fmt.Stringer values. Besides preserving their textual
representation, fmt handles typed-nil implementations without
propagating a panic from their Error or String method.

Also simplify the final fmt.Sprintf("%v", v) fallback to fmt.Sprint(v).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-08-26 23:28:11 +00:00
..
2026-03-15 18:24:15 +01:00