with Stack Trace
Creates a synthetic exception and attaches it as the "cause" of the log statement as a way to provide additional context for the logging call itself. The exception created by this method is always of the type LogSiteStackTrace, and its message indicates the stack size.
If the withCause(e) method is also called for the log statement (either before or after) withStackTrace(), the given exception becomes the cause of the synthetic exception.
Parameters
size
the maximum size of the stack trace to be generated.