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 enabled
    static void setRootLevel​(java.lang.String level)
    Sets the level of the root logger

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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