Skip to content

Format logs in nested JSON #80

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

Closed
thekamaster opened this issue Jul 6, 2020 · 1 comment
Closed

Format logs in nested JSON #80

thekamaster opened this issue Jul 6, 2020 · 1 comment

Comments

@thekamaster
Copy link

thekamaster commented Jul 6, 2020

Hi

We are using logstash in our log ingestion pipeline and we found out that logs from this library are not in nested JSON format, which can cause issues in logstash processing, and also correct nested JSON formatting was highly recommanded by our elasticsearch support (as the *beats do).

An example log :
{"@timestamp":"2020-07-06T09:07:25.481Z", "log.level": "INFO", "message":"Command line argument: -Dcatalina.base=/opt/tomcat", "service.name":"tomcat","event.dataset":"catalina.out","process.thread.name":"main","log.logger":"org.apache.catalina.startup.VersionLoggerListener"}

would be :
{"@timestamp":"2020-07-06T09:07:25.481Z","log":{"level":"INFO","logger":"org.apache.catalina.startup.VersionLoggerListener"},"message":"Command line argument: -Dcatalina.base=/opt/tomcat","service":{"name":"tomcat"},"event":{"dataset":"catalina.out"},"process":{"thread":{"name":"main"}}}

Can this library output be properly nested ?
Thanks,
Alexandre

@felixbarny
Copy link
Member

felixbarny commented Jul 6, 2020

Closing as duplicate of #51 (comment).

I feel your pain. Make sure to upvote the referenced Beats issue.

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

2 participants