log
log copied to clipboard
ObjectMarshaler produces invalid JSON
Hey there!
In case the error provided to the logger is an ObjectMarshaler then the produced JSON will be invalid, as the current code is opens up the "error": key, then it calls the marshaller which cannot interact with the buffer and the outcome is going to be something like this:
"goid": 1,
"error": ,
https://github.com/phuslu/log/blob/5f015069480e507328d2af56da6d1af199b6284e/logger.go#L946
Have a nice day!