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(Object message){
        System.out.print(StringColor.RESET + message);
    }

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

    public void debug(Object message){
        this.debug(message, StringColor.RESET);
    }

    public void debug(Object 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(Object message){
        this.debugln(message, StringColor.RESET);
    }

    public void debugln(Object 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(Object message, Exception e){
        this.debugln(message, StringColor.RED);
        this.debug("", StringColor.RED);
        e.printStackTrace();
        this.reset();
    }

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

}

@@ -233,22 +233,22 @@
 d print(
-Object
+String
  message
@@ -336,22 +336,22 @@
 println(
-Object
+String
  message
@@ -431,38 +431,38 @@
 blic void debug(
-Object
+String
  message)%7B%0A     
@@ -484,33 +484,18 @@
 essage, 
-StringColor.RESET
+%22%22
 );%0A    %7D
@@ -518,22 +518,22 @@
 d debug(
-Object
+String
  message
@@ -779,38 +779,38 @@
 ic void debugln(
-Object
+String
  message)%7B%0A     
@@ -834,33 +834,18 @@
 essage, 
-StringColor.RESET
+%22%22
 );%0A    %7D
@@ -870,22 +870,22 @@
 debugln(
-Object
+String
  message
@@ -1214,14 +1214,14 @@
 ror(
-Object
+String
  mes
@@ -1358,38 +1358,16 @@
 race();%0A
-        this.reset();%0A
     %7D%0A%0A 
@@ -1475,30 +1475,8 @@
 ();%0A
-        this.reset();%0A
     

Fix bug of logger