Skip to content

JSON requirement not made clear #3

Description

@endophage

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions