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

omit newline characters #236

Open
goodale opened this issue Sep 23, 2021 · 1 comment
Open

omit newline characters #236

goodale opened this issue Sep 23, 2021 · 1 comment

Comments

@goodale
Copy link

goodale commented Sep 23, 2021

I am using the log4j2 JSON layout with compact="true" setting. papertrails (papertrailsapp.com) is not recognizing the data as JSON and their support folks think the issue is that remote_syslog2 is adding newline characters.

Is there a way to omit remote_syslog2 from doing this?

@markdascher
Copy link
Contributor

After some additional research, we've determined that the log4j2 JSON situation boils down to this:

  • compact=false (default) results in Papertrail receiving JSON messages split up into multiple lines
  • compact=true results in no newlines at all, which might prevent remote_syslog2 from sending anything at all
  • The solution is compact=true eventEol=true, which keeps each individual JSON message on its own line, without adding any extra newlines.

I believe Papertrail Support reached out with this new information, but please let us know if there's still any trouble.

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