Class Logger

java.lang.Object
com.xpdustry.simple_blacklist.util.Logger

public class Logger extends Object
Log messages to console with topics
  • Field Details

    • empty

      protected static final Object[] empty
    • tagsColors

      protected static String[] tagsColors
    • slf4mdPresent

      protected static boolean slf4mdPresent
      Will use slf4j when slf4md plugin is present
    • slf4jLogger

      protected static Object slf4jLogger
    • mainTopic

      public static String mainTopic
    • topicFormat

      public static String topicFormat
    • forceDebug

      public static boolean forceDebug
      Force debug log level of all logger instances, even Log.LogLevel is not to debug.
      Note that if enabled, Log will be always used.
    • topic

      public final String topic
  • Constructor Details

    • Logger

      public Logger()
      Will only use the mainTopic.
    • Logger

      public Logger(Class<?> clazz)
    • Logger

      public Logger(String topic)
  • Method Details

    • init

      public static void init(mindustry.mod.Mod mod)
      Sets the main topic using the mod.
    • init

      public static void init(Class<? extends mindustry.mod.Mod> mod)
      Sets the main topic using the mod class.
    • init

      public static void init(String mainTopic)
      Sets the main topic
    • cannotLog

      public boolean cannotLog(arc.util.Log.LogLevel level)
      Return true if the log level is not enough to log the message.
      Can be used like that: if (cannotLog(level)) return;
    • log

      public void log(arc.util.Log.LogLevel level, String text, Throwable th, Object... args)
    • log

      public void log(arc.util.Log.LogLevel level, String text, Object... args)
    • log

      public void log(arc.util.Log.LogLevel level, String text)
    • debug

      public void debug(String text, Object... args)
    • debug

      public void debug(Object object)
    • info

      public void info(String text, Object... args)
    • info

      public void info(Object object)
    • warn

      public void warn(String text, Object... args)
    • warn

      public void warn(String text)
    • err

      public void err(String text, Throwable th, Object... args)
    • err

      public void err(String text, Object... args)
    • err

      public void err(String text)
    • err

      public void err(String text, Throwable th)
    • err

      public void err(Throwable th)
    • none

      public void none()
      Log an empty "info" line