Class Debugger
java.lang.Object
com.jackmeng.halcyoninae.halcyon.utils.Debugger
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
FieldsModifier and TypeFieldDescriptionstatic boolean
A globally modifiable variable (should only be modified programmatically) to either disable or enable during runtime.static PrintStream
The designated output stream to be used by the debugger with attached encoding. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
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 alertstatic String
static <T> void
good
(T... o) Similar tolog(Object...)
andwarn(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 tolog(Object...)
but with custom coloring and custom header to signify a warning log.
-
Field Details
-
out
The designated output stream to be used by the debugger with attached encoding. -
DISABLE_DEBUGGER
public static boolean DISABLE_DEBUGGERA 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
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
- Returns:
- String Get's the default warning message header.
-
getGoodText
- Returns:
- String Gets the default success/good message header
-
getProgramText
Default alert- Returns:
- String Gets teh default program alert message header
-
getDefaultInfoText
- Returns:
- String
-
log
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
Similar tolog(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
Similar tolog(Object...)
andwarn(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
This method is only used for programming purposes.- Type Parameters:
T
-- Parameters:
o
-
-
crit
- Parameters:
o
-
-
info
- Type Parameters:
T
-- Parameters:
o
-- Since:
- 3.3
-
alert
- Parameters:
t
-
-