Package loci.common
Class Log4jTools
java.lang.Object
loci.common.Log4jTools
A utility class with convenience methods for log4j.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanAttempts to enable SLF4J logging via log4j without an external configuration file.static booleanChecks whether the log4j framework was successfully enabledstatic voidsetRootLevel(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:
trueif logging was successfully enabled
-
setRootLevel
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:
trueif logging was successfully enabled
-