package tribunal.tool;


import java.text.SimpleDateFormat;
import java.util.Date;

public class Logger {

    String packageName;

    public Logger(String packageName) {
        this.packageName = packageName;
    }


    public void print(String message) {
        System.out.print(StringColor.RESET + message);
    }

    public void print(String message, String color) {
        System.out.print(color + message);
    }


    public void println(String message) {
        System.out.println(StringColor.RESET + message);
    }

    public void println(String message, String color) {
        System.out.println(color + message);
    }


    public void debug(String message) {
        this.debug(message, null);
    }

    public void debug(String message, String color) {
        SimpleDateFormat d = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
        String date = d.format(new Date());
        System.out.print(color + "[" + date + "] <" + packageName + "> " + message);
    }


    public void debugln(String message) {
        this.debugln(message, null);
    }

    public void debugln(String message, String color) {
        SimpleDateFormat d = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
        String date = d.format(new Date());
        System.out.println(color + "[" + date + "] <" + packageName + "> " + message);
    }

    public void reset() {
        this.print(StringColor.RESET);
    }

    public void error(String message, Exception e) {
        this.debugln(message, StringColor.RED);
        this.debug("", StringColor.RED);
        e.printStackTrace();
    }

    public void error(Exception e) {
        this.debug("", StringColor.RED);
        e.printStackTrace();
    }

}

@@ -574,32 +574,83 @@
 String color) %7B%0A
+        if (color == null)%0A            color = %22%22;%0A
         System.o
@@ -814,32 +814,83 @@
 String color) %7B%0A
+        if (color == null)%0A            color = %22%22;%0A
         SimpleDa
@@ -1222,32 +1222,83 @@
 String color) %7B%0A
+        if (color == null)%0A            color = %22%22;%0A
         SimpleDa

Fix color bug