Class ConfigLogger

java.lang.Object
io.github.projectunified.craftconfig.common.ConfigLogger

public final class ConfigLogger extends Object
Thin logger provider for CraftConfig. By default, logs to Logger. Set a custom handler via set(Handler) to redirect logs.
  • Method Details

    • set

      public static void set(ConfigLogger.Handler logHandler)
      Set a custom log handler.
      Parameters:
      logHandler - the handler, or null to reset to default
    • warn

      public static void warn(Class<?> clazz, String message)
      Log a message at WARNING level
      Parameters:
      clazz - the calling class
      message - the message
    • warn

      public static void warn(Class<?> clazz, String message, Throwable throwable)
      Log a message with throwable at WARNING level
      Parameters:
      clazz - the calling class
      message - the message
      throwable - the throwable
    • log

      public static void log(ConfigLogger.LogLevel level, Class<?> clazz, String message, Throwable throwable)
      Log a message with throwable
      Parameters:
      level - the log level
      clazz - the calling class
      message - the message
      throwable - the throwable