org.apache.uima.fit.testing.util

## 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 Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Level` | `disableLogging()` Disable all logging.
    `static void` | `enableLogging(Level level)` Enable all logging.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### 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().

Copyright © 2012–2021 The Apache Software Foundation. All rights reserved.