I may able to do the job if you agree.
The best option may to add a boolean (eg. "oneLineStackTrace").
This boolean will control when to do the flush and if the getPrefixPattern() should prefix the stackTraceLayout or not.