If the logging is set be in JSON format with JsonFormatEx, when we pass in map datatypes to the logger, it logs a string representation of the map rather than the JSON representation.
This is because of the formatJsonValue function in format.go which converts anything which is not an int, float or string into its literal string representation.
Go json's default behavior is to recursively marshall maps or structs containing maps.
If the logging is set be in JSON format with
JsonFormatEx
, when we pass in map datatypes to the logger, it logs a string representation of the map rather than the JSON representation.This is because of the
formatJsonValue
function informat.go
which converts anything which is not an int, float or string into its literal string representation.Go json's default behavior is to recursively marshall maps or structs containing maps.