public final class DebugTools extends Object
| Modifier and Type | Field and Description |
|---|---|
(package private) static String[][] |
TOOL_CLASSES |
| Modifier | Constructor and Description |
|---|---|
private |
DebugTools() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
enableIJLogging(boolean debug)
Enable SLF4J logging using logback, in the context of ImageJ.
|
static boolean |
enableLogging()
Attempts to enable SLF4J logging via logback or log4j.
|
static boolean |
enableLogging(String level)
Attempts to enable SLF4J logging and set the root logger level.
|
static String |
getFieldName(Class<?> c,
int value)
This method uses reflection to scan the values of the given class's
static fields, returning the first matching field's name.
|
static String |
getStackTrace(Throwable t)
Extracts the given exception's corresponding stack trace to a string.
|
static boolean |
isEnabled()
Checks whether SLF4J logging has been enabled via logback or log4j.
|
static void |
setRootLevel(String level)
Sets the root logger level.
|
static final String[][] TOOL_CLASSES
public static String getStackTrace(Throwable t)
public static boolean isEnabled()
true if logging has been successfully enabledpublic static void setRootLevel(String level)
level - A string indicating the desired levelpublic static boolean enableLogging()
isEnabled().true if logging was successfully enabled by this methodpublic static boolean enableLogging(String level)
enableLogging(). If this method returns true, the root
logger level is also set via setRootLevel(String) using the
input level.level - A string indicating the desired leveltrue if logging was successfully enabled by this methodpublic static boolean enableIJLogging(boolean debug)
debug - true if debug-level output should be shownCopyright © 2016 Open Microscopy Environment