Class LoggingConfig

java.lang.Object
com.cedarsoftware.util.LoggingConfig

public final class LoggingConfig extends Object
Configures java.util.logging to use a uniform log format similar to popular frameworks like SLF4J/Logback.
  • Method Details

    • init

      public static void init()
      Initialize logging if not already configured. The formatter pattern can be set via system property "ju.log.dateFormat" or by calling init(String).
    • init

      public static void init(String datePattern)
      Initialize logging with the supplied date pattern if not already configured.
      Parameters:
      datePattern - pattern passed to SafeSimpleDateFormat
    • useUniformFormatter

      public static void useUniformFormatter(Handler handler)
      Set the LoggingConfig.UniformFormatter on the supplied handler.
      Parameters:
      handler - the handler to configure