public class ThreadUtil extends Object
To print to STDOUT, just call printMyStackTrace(). If using a
logging framework, instead call getMyStackTrace() and log the
result.
| Modifier and Type | Method and Description |
|---|---|
static String |
getMyStackTrace()
Gets current stack trace as a
String. |
static String |
getMyStackTraceOneLine() |
static void |
printMyStackTrace()
Prints current stack to
System.out. |
static void |
printMyStackTrace(PrintStream out)
Prints current stack to the specified
PrintStream. |
public static void printMyStackTrace()
System.out.public static void printMyStackTrace(PrintStream out)
PrintStream.out - parameterpublic static String getMyStackTrace()
String.public static String getMyStackTraceOneLine()
Copyright 2004-2021 Solace Corporation. All rights reserved.