java.lang.Object
io.github.thebusybiscuit.slimefun4.core.debug.Debug

public final class Debug extends Object
This class is responsible for debug logging. Server owners can enable testing specific cases and have debug logs for those cases. Note: We don't have validates in here because we want it to be quick and it's mainly for us internal devs.
Author:
WalshyDev
  • Method Details

    • log

      public static void log(@Nonnull TestCase testCase, @Nonnull String msg)
      Log a message if the TestCase is currently enabled.
      Parameters:
      testCase - The TestCase to use
      msg - The message to log
    • log

      public static void log(@Nonnull TestCase testCase, @Nonnull String msg, @Nonnull Object... vars)
      Log a variable message if the TestCase is currently enabled.
      Parameters:
      testCase - The TestCase to use
      msg - The message to log
      vars - The variables to replace, use "{}" in the message and have it replaced with a specified thing
    • log

      public static void log(@Nonnull String test, @Nonnull String msg)
      Log a message if the test case is currently enabled.
      Parameters:
      test - The test case to use
      msg - The message to log
    • log

      public static void log(@Nonnull String test, @Nonnull String msg, @Nonnull Object... vars)
      Log a message if the test case is currently enabled.
      Parameters:
      test - The test case to use
      msg - The message to log
      vars - The variables to replace, use "{}" in the message and have it replaced with a specified thing
    • setTestCase

      public static void setTestCase(@Nullable String test)
      Set the current test case for this server. This will enable debug logging for this specific case which can be helpful by Slimefun or addon developers.
      Parameters:
      test - The test case to enable or null to disable it
    • getTestCase

      @Nullable public static String getTestCase()
      Get the current test case for this server or null if disabled
      Returns:
      The current test case to enable or null if disabled