How the use the multiline in these situation?

This is basically the same question as the one you posed in How to use the multiline in for these logs. Let's keep things in one thread.