The output of struct's String() suppose to be consumed as a formatted text primarily by a human. With something like this fmt.Printf("%+v", event).
Unfortunately current String() has a number of problems:
- it uses non-standard struct representation that is inconsistent with the majority of the golang libraries/projects
- it contacts the fields
- %+v does not print fields names
Printf() does not print Env, probably because the current string prints NUL-symbol (it is a bad idea to use NUL-symbol).
Please remove the custom incorrect String() implementation and consider using the default implementation.
The output of struct's
String()suppose to be consumed as a formatted text primarily by a human. With something like thisfmt.Printf("%+v", event).Unfortunately current
String()has a number of problems:Printf()does not print Env, probably because the current string prints NUL-symbol (it is a bad idea to use NUL-symbol).Please remove the custom incorrect
String()implementation and consider using the default implementation.