Class DisableLogging

java.lang.Object
org.apache.uima.fit.testing.util.DisableLogging

public final class DisableLogging extends Object
When you are running a suite of unit tests it is often nice to turn off logging. This class helps you do this. However, it only works if logging is being done by the Java logger, not by, say, log4j.
  • Method Details

    • disableLogging

      public static Level disableLogging()
      Disable all logging.
      Returns:
      The original logging level.
    • enableLogging

      public static void enableLogging(Level level)
      Enable all logging.
      Parameters:
      level - The logging level to be restored. Usually this is the result returned by disableLogging().