I think this is a common problem of at least Java services. You can solve this problem with **fluentd** itself
- https://stackoverflow.com/questions/57327257/how-to-parse-multiline-java-error-exception-stack-traces-input-in-fluentd-i-sho
- https://github.com/fluent/fluent-plugin-grok-parser/issues/69
It seems that in Log4j2 there is a configurable solution for this. It can also be done in log4j1 (current version in ivy) but it's not that easy to correctly implement it in ivy.
https://stackoverflow.com/questions/38486248/how-to-make-log4j-syslog-appender-write-a-stack-trace-in-one-line/55407412#55407412
I recommend to solve it in **fluentd** for now. On our side we plan to upgrade to **log4j2**.