Class JavaUtilLogging

java.lang.Object
dev.enola.common.logging.JavaUtilLogging

public final class JavaUtilLogging extends Object
Configures java.util.logging (JUL).

This is intended to be called once at application startup (main method). It has global side effects, and is not meant to be used from libraries.

  • Method Details

    • configure

      public static void configure(Level level)
      Configures logging.

      This sets two System.setProperty(String, String) properties to work around other logging frameworks, and to configure the format.

      This removes all existing handlers from the root logger, and adds a single new handler which logs all messages at or above the given Level to standard error, with colors.

      Parameters:
      level - the Level for the root logger and its new handler.