inconshreveable / log15

Structured, composable logging for Go
https://godoc.org/github.com/inconshreveable/log15
Other
1.1k stars 144 forks source link

Map types not being converted to JSON format correctly #93

Closed varunagrawal closed 5 years ago

varunagrawal commented 8 years ago

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.

varunagrawal commented 8 years ago

Any updates?

varunagrawal commented 5 years ago

Fixed as of #94