Whichever Docker log driver you use you'll face the same issue. Docker treats each line flushed to stdout / stderror as a separate event. This is perfectly reasonable behavior as it cannot know what constitutes the start and end of a multi-line log event.
I came to the conclusion the easiest way to address this was at source. Alter your log4j layout to escape the newlines in stack traces.
... View more