Class Debugger

java.lang.Object
com.jackmeng.halcyoninae.halcyon.utils.Debugger

public class Debugger extends Object
This is an external class that is called upon for when the program needs something printed the Console.

However the standard console or System.out System.out can be disabled for extraneous logging.

This means the program must use out.

Since:
3.0
Author:
Jack Meng
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static boolean
    A globally modifiable variable (should only be modified programmatically) to either disable or enable during runtime.
    The designated output stream to be used by the debugger with attached encoding.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Sad constructor that is ignored :(
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    alert(TConstr... t)
     
    static void
    byteLog(byte... e)
     
    static <T> void
    crit(T... o)
     
    static String
     
    static String
     
    static String
    This function returns the default heder text to define itself as a logging message instead of other extraneous messages.
    static String
    Default alert
    static String
     
    static <T> void
    good(T... o)
    Similar to log(Object...) and warn(Object...) but instead is for when something goes good.
    static <T> void
    info(T... o)
     
    static <T> void
    log(T... o)
    Prints the necessary Objects to System.
    static <T> void
    unsafeLog(T... o)
    This method is only used for programming purposes.
    static <T> void
    warn(T... o)
    Similar to log(Object...) but with custom coloring and custom header to signify a warning log.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • out

      public static PrintStream out
      The designated output stream to be used by the debugger with attached encoding.
    • DISABLE_DEBUGGER

      public static boolean DISABLE_DEBUGGER
      A globally modifiable variable (should only be modified programmatically) to either disable or enable during runtime.

      Reminder: This does not clear the stream if it is called during runtime; this boolean only stops any further synced output stream that have not reached the stage of a check on the state of this variable's equality.

  • Constructor Details

    • Debugger

      private Debugger()
      Sad constructor that is ignored :(
  • Method Details

    • getLogText

      public static String getLogText()
      This function returns the default heder text to define itself as a logging message instead of other extraneous messages.
      Returns:
      The Header Log text
    • getWarnText

      public static String getWarnText()
      Returns:
      String Get's the default warning message header.
    • getGoodText

      public static String getGoodText()
      Returns:
      String Gets the default success/good message header
    • getProgramText

      public static String getProgramText()
      Default alert
      Returns:
      String Gets teh default program alert message header
    • getDefaultInfoText

      public static String getDefaultInfoText()
      Returns:
      String
    • log

      @SafeVarargs public static <T> void log(T... o)
      Prints the necessary Objects to System. Err
      Type Parameters:
      T - The varargs of types as a generic
      Parameters:
      o - The objects to be printed to the stream
    • warn

      @SafeVarargs public static <T> void warn(T... o)
      Similar to log(Object...) but with custom coloring and custom header to signify a warning log.

      This is not specifically for debugging and is used to signify a fault somewhere that needs major attention.

      Type Parameters:
      T - The varargs of types as a generic
      Parameters:
      o - The objects to be printed to the stream
    • good

      @SafeVarargs public static <T> void good(T... o)
      Similar to log(Object...) and warn(Object...) but instead is for when something goes good.

      This is not specifically for debugging and is used to signify a success message.

      Type Parameters:
      T - The varargs of types as a generic
      Parameters:
      o - The objects to be printed to the stream
    • byteLog

      public static void byteLog(byte... e)
      Parameters:
      e -
    • unsafeLog

      @SafeVarargs public static <T> void unsafeLog(T... o)
      This method is only used for programming purposes.
      Type Parameters:
      T -
      Parameters:
      o -
    • crit

      @SafeVarargs public static <T> void crit(T... o)
      Parameters:
      o -
    • info

      @SafeVarargs public static <T> void info(T... o)
      Type Parameters:
      T -
      Parameters:
      o -
      Since:
      3.3
    • alert

      public static void alert(TConstr... t)
      Parameters:
      t -