logspout-logstash icon indicating copy to clipboard operation
logspout-logstash copied to clipboard

Preserve JSON Number formating

Open godric7 opened this issue 7 years ago • 1 comments

When logging JSON numbers from docker, ex:{"value":1000000} the value is converted to scientific notation once it's gone through the Marshall/Unmarshalling. ie:{"value":1e+06}

While this is not technically incorrect, it prevents us from looking for specific values in the logs (ids) without manually converting them to scientific notation.

I tried to come up with a fix myself (https://stackoverflow.com/a/22346593/8125689 looks promising), but while the issue definitely happens with the Bekt/logspout-logstash image, I wasn't able to reproduce it in a test case 😕

PS: Loads of thanks for this project, we've been using it on production server for a while as part of our monitoring system and it does a pretty good job 👍

godric7 avatar Jul 27 '17 14:07 godric7

If anyone could do a PR I would be happy to merge it.

maxekman avatar Nov 30 '17 12:11 maxekman