Class KLogger

java.lang.Object
org.kingdoms.main.KLogger

public final class KLogger extends Object
  • Field Details

    • SILENT

      public static final Object SILENT
    • RAW

      public static final Object RAW
    • DEFAULT

      @TestOnly public static final KLogger DEFAULT
  • Constructor Details

    • KLogger

      public KLogger(DebugNS ns)
    • KLogger

      public KLogger(DebugNS ns, boolean printHeader)
    • KLogger

      public KLogger(DebugNS ns, boolean printHeader, Object cooldownObject, Duration cooldown)
  • Method Details

    • toggleDebugMode

      public static boolean toggleDebugMode()
    • getDebugValues

      public static Map<String,String> getDebugValues()
    • isEnabled

      public boolean isEnabled()
    • hasDebugValue

      public static boolean hasDebugValue(String key)
    • getDebugValue

      public static String getDebugValue(String key)
    • info

      public static void info(Object str)
    • todo

      @Deprecated @TestOnly @Bookmark(REMINDER) public static void todo(Object... objs)
      Deprecated.
      Used for adding debug information that is only intended for testing purposes. Can be searched for method usage easily within the IDE before distributing a public JAR.
    • calledFrom

      public static boolean calledFrom(Class<?> clazz)
    • originatesFrom

      public boolean originatesFrom(StackTraceElement[] stackTrace)
    • originatesFrom

      public static boolean originatesFrom(StackTraceElement[] first, StackTraceElement[] stackTrace)
    • startKeyExchange

      public void startKeyExchange(Object key)
    • exchangeKeys

      @TestOnly public boolean exchangeKeys(Object previous, Object next)
    • hasKey

      @TestOnly public boolean hasKey(Object previous)
    • isTraced

      @TestOnly public boolean isTraced()
    • traceStack

      @TestOnly public KLogger traceStack()
    • getTrueStackTrace

      public StackTraceElement[] getTrueStackTrace()
    • traceThread

      @TestOnly public KLogger traceThread(boolean waitToFinish, Runnable runnable)
    • traced

      @TestOnly public void traced(Object message)
    • debug

      public static void debug(DebugNS ns, Supplier<Object> obj)
    • isDebugging

      public static boolean isDebugging()
    • debugTracing

      public static boolean debugTracing()
    • debug

      public static void debug(DebugNS ns, Object str)
    • warn

      public static void warn(Object str)
    • error

      public static void error(Object str)
    • property

      public KLogger property(Object name, boolean bool)
    • property

      public KLogger property(Object name, Object value)
    • end

      public void end()
    • log

      public void log(Object str)
    • log

      public void log(Duration cooldown, Object str)
    • log

      public void log(DebugNS ns, Object str)
    • log

      public void log(Supplier<Object> str)
    • log

      public void log(DebugNS ns, Supplier<Object> str)