public final class DebugTools
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
enableIJLogging(boolean debug)
Enable SLF4J logging using logback, in the context of ImageJ.
|
static boolean |
enableLogging(java.lang.String level)
Attempts to enable SLF4J logging via logback or log4j
without an external configuration file.
|
static java.lang.String |
getFieldName(java.lang.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 java.lang.String |
getStackTrace(java.lang.Throwable t)
Extracts the given exception's corresponding stack trace to a string.
|
public static java.lang.String getStackTrace(java.lang.Throwable t)
public static boolean enableLogging(java.lang.String level)
level
- A string indicating the desired level
(i.e.: ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN).public static boolean enableIJLogging(boolean debug)
debug
- true if debug-level output should be shownpublic static java.lang.String getFieldName(java.lang.Class<?> c, int value)
Copyright © 2014 Open Microscopy Environment