notjacob

Spigot logger

Jan 11th, 2020
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. /**
  2. *@author notjacob
  3. */
  4.     public static void log(String msg, LogType type, Date date) {
  5.         String finalm = "[CORE2] " + "[" + format.format(date) + "] " + "[" + type + "] " + msg;
  6.         try {
  7.             PrintStream ps = new PrintStream(f);
  8.             ps.println(finalm);
  9.             System.out.println("[CORE2] " + "[" + format.format(date) + "] " + "[" + type + "] " + msg);
  10.             ps.flush();
  11.             ps.close();
  12.         } catch (FileNotFoundException e) {
  13.             e.printStackTrace();
  14.         }
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment