Exemplo n.º 1
0
 public void save(String... args) {
   String time = Util.getTime();
   String arg = Util.bindArray(args);
   if (Calendar.getInstance().get(Calendar.DATE) != dayNumber) {
     file =
         new File(
             Main.getLogFolderName()
                 + File.separator
                 + plugin.getPluginName()
                 + File.separator
                 + (folderName.isEmpty() ? "" : (folderName + File.separator))
                 + new StringBuilder()
                     .append(Calendar.getInstance().get(Calendar.YEAR))
                     .append(".")
                     .append(Calendar.getInstance().get(Calendar.MONTH) + 1)
                     .append(".")
                     .append(Calendar.getInstance().get(Calendar.DATE))
                     .append(":")
                     .append(Calendar.getInstance().get(Calendar.HOUR_OF_DAY))
                     .append(".")
                     .append(Calendar.getInstance().get(Calendar.MINUTE))
                     .append(".")
                     .append(Calendar.getInstance().get(Calendar.SECOND))
                 + ".log");
   }
   fileWrite(time + "| " + arg);
 }
Exemplo n.º 2
0
 public void write(String... args) {
   String time = Util.getTime();
   String arg = Util.bindArray(args);
   System.out.println(time + "| " + arg);
   save(args);
 }