Package loci.common

Class Log4jTools


  • public final class Log4jTools
    extends Object
    A utility class with convenience methods for log4j.
    • Method Detail

      • 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​(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