public class StackTraceUtil
extends java.lang.Object
| Constructor and Description |
|---|
StackTraceUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.StackTraceElement[] |
getCroppedRealStackTrack(java.lang.StackTraceElement[] stackTrace,
java.lang.String stackTraceOrigin,
int maxDepth)
Get the real stack trace and then crop it with a max depth.
|
static java.lang.String |
getStackTraceString(java.lang.Throwable tr)
Get a loggable stack trace from a Throwable
|
public static java.lang.String getStackTraceString(java.lang.Throwable tr)
tr - An exception to logpublic static java.lang.StackTraceElement[] getCroppedRealStackTrack(java.lang.StackTraceElement[] stackTrace,
java.lang.String stackTraceOrigin,
int maxDepth)
stackTrace - the full stack tracemaxDepth - the max depth of real stack trace that will be cropped, 0 means no limitation