Add support for multiline logging of exceptions.