Added "debug" to the Logger

This commit is contained in:
Mathieu 2020-10-10 10:29:12 +02:00
parent 9562050d23
commit 09361d3ff1

View File

@ -7,6 +7,8 @@ public class Logger {
public static final String ANSI_GREEN = "\u001B[32m"; public static final String ANSI_GREEN = "\u001B[32m";
public static final String ANSI_YELLOW = "\u001B[33m"; public static final String ANSI_YELLOW = "\u001B[33m";
public static final String RED_BOLD = "\033[1;31m"; public static final String RED_BOLD = "\033[1;31m";
public static final String GREEN_BOLD = "\033[1;32m";
public static void error(String message) { public static void error(String message) {
print(ANSI_RED + "[ERROR] " + message + ANSI_RESET); print(ANSI_RED + "[ERROR] " + message + ANSI_RESET);
@ -16,6 +18,10 @@ public class Logger {
print(ANSI_GREEN + "[INFO] " + message + ANSI_RESET); print(ANSI_GREEN + "[INFO] " + message + ANSI_RESET);
} }
public static void debug(String message) {
print(GREEN_BOLD + "[DEBUG] " + message + ANSI_RESET);
}
public static void warn(String message) { public static void warn(String message) {
print(ANSI_YELLOW + "[WARN] " + message + ANSI_RESET); print(ANSI_YELLOW + "[WARN] " + message + ANSI_RESET);
} }