Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON requirement not made clear #3

Open
endophage opened this issue May 7, 2019 · 0 comments
Open

JSON requirement not made clear #3

endophage opened this issue May 7, 2019 · 0 comments

Comments

@endophage
Copy link

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant