Package loci.common
Class Log4jTools
java.lang.Object
loci.common.Log4jTools
public final class Log4jTools
extends java.lang.Object
A utility class with convenience methods for log4j.
-
Method Summary
Modifier and Type Method Description static boolean
enableLogging()
Attempts to enable SLF4J logging via log4j without an external configuration file.static boolean
isEnabled()
Checks whether the log4j framework was successfully enabledstatic void
setRootLevel(java.lang.String level)
Sets the level of the root logger
-
Method Details
-
isEnabled
public static boolean isEnabled()Checks whether the log4j framework was successfully enabled- Returns:
true
if logging was successfully enabled
-
setRootLevel
public static void setRootLevel(java.lang.String level)Sets the level of the root logger- Parameters:
level
- A string indicating the desired level (i.e.: ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN).
-
enableLogging
public static boolean enableLogging()Attempts to enable SLF4J logging via log4j without an external configuration file.- Returns:
true
if logging was successfully enabled
-