What is the easiest way to convert the result of Throwable.getStackTrace() to a string that depicts the stacktrace?
Throwable.getStackTrace()
My oneliner to convert stack trace to the enclosed multi-line string:
Stream.of(e.getStackTrace()).map((a) -> a.toString()).collect(Collectors.joining("\n", "[", "]"))
Easy to pass to the logger "as is".