doublefree/sumorus

JSON requirement not made clear

endophage opened this issue · 0 comments

This hook only works if the formatter on the logrus logger outputs JSON. This requirement isn't detailed anywhere, or if it is it needs to be more obvious. I had to read the code to notice it attempts to unmarshal the entry string as JSON. The result was null data fields in sumo.

If everyone is agreeable I'll open a PR with 2 changes:

  1. Update the sample in the README to show the setting of the formatter to logrus.JSONFormatter
  2. Following how logrus does it, have the err from json.Unmarshal printed to stderr.