|
@@ -15,15 +15,15 @@ public class newFileTool {
|
|
//SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
//SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
FastDateFormat format = FastDateFormat.getInstance("yyyy-MM-dd");
|
|
FastDateFormat format = FastDateFormat.getInstance("yyyy-MM-dd");
|
|
String date = format.format(new Date());
|
|
String date = format.format(new Date());
|
|
- File file = new File("../log/" + date + "-" + type);
|
|
|
|
|
|
+ File file = new File("../log/" + date + "-" + type + ".txt");
|
|
FileWriter fileWriter = new FileWriter(file,true);
|
|
FileWriter fileWriter = new FileWriter(file,true);
|
|
- SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
+ FastDateFormat format1 = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss");
|
|
fileWriter.append("\n");
|
|
fileWriter.append("\n");
|
|
- fileWriter.append(sdf1.format(new Date()) + "-----------------------");
|
|
|
|
|
|
+ fileWriter.append(format1.format(new Date()) + "-----------------------");
|
|
fileWriter.append("\n");
|
|
fileWriter.append("\n");
|
|
fileWriter.append(jsonString);
|
|
fileWriter.append(jsonString);
|
|
fileWriter.append("\n");
|
|
fileWriter.append("\n");
|
|
- fileWriter.append(sdf1.format(new Date()) + "-----------------------");
|
|
|
|
|
|
+ fileWriter.append(format1.format(new Date()) + "-----------------------");
|
|
fileWriter.append("\n");
|
|
fileWriter.append("\n");
|
|
fileWriter.flush();
|
|
fileWriter.flush();
|
|
fileWriter.close();
|
|
fileWriter.close();
|