Split log message and stacktrace when logging exception.

Change-Id: I039bb90d33d935ab7b1aad17d4e60965110008e7