remote_syslog2
remote_syslog2 copied to clipboard
omit newline characters
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?
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.