log: %s semantics different from stdlib for nil pointers #64158
Labels
A-logging
In and around the logging infrastructure.
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-server-and-security
DB Server & Security
I've seen this in a log message, resulting from using
%s
for printing a nil pointer of a type that implementsSafeFormatter
on a value receiver.This is different from what
fmt.Printf
does for the Stringer interface, where it prints<nil>
. If possible, it'd certainly take the<nil>
. I've found this thread that might describe how to handle this case in the logging lib: golang/go#20995The text was updated successfully, but these errors were encountered: