-
Notifications
You must be signed in to change notification settings - Fork 219
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
RFE - Structured Logging #286
Comments
Hi, @jeffspahr. Using a JSON formatter in logrus will make each log statement a separate JSON block, like this:
Would you please confirm that is what you need? The built-in JSON formatter in logrus didn't work well, but it was straightforward to write a custom one. And would you need to specify this to the Trident installer? |
Hey @clintonk, This looks great! I have two field name suggestions since logrus has interesting defaults. This will better align with out of the box Elasticsearch expectations.
Here's what this looks like after running it through our logging pipeline: Note that Thanks, |
Yeah that would make sense. |
@jeffspahr Thanks for the feedback. Time is very short for 19.10, so I'd appreciate your confirming this works for you:
|
I just ran this through our pipeline as well. |
It would be nice to be able to enable structured json logging for Trident. This is beneficial for use in log aggregation solutions like the Elastic Stack so you don't have to parse fields in a single log message.
It looks like Trident is using logrus which supports json logging so hopefully the LOE isn't terrible.
The text was updated successfully, but these errors were encountered: