no message
This commit is contained in:
@@ -2219,15 +2219,15 @@ public class IMysqlLocalServiceImpl implements IMysqlLocalService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void appendToFile(String filePath, String format, Object... args) {
|
public static void appendToFile(String filePath, String format, Object... args) {
|
||||||
try (BufferedWriter writer = new BufferedWriter(new FileWriter(filePath, true))) {
|
// try (BufferedWriter writer = new BufferedWriter(new FileWriter(filePath, true))) {
|
||||||
String timestamp = LocalDateTime.now().format(formatter);
|
// String timestamp = LocalDateTime.now().format(formatter);
|
||||||
String content = String.format(format, args);
|
// String content = String.format(format, args);
|
||||||
String logLine = String.format("[%s] %s", timestamp, content);
|
// String logLine = String.format("[%s] %s", timestamp, content);
|
||||||
writer.write(logLine);
|
// writer.write(logLine);
|
||||||
writer.newLine(); // 可选:添加换行符
|
// writer.newLine(); // 可选:添加换行符
|
||||||
} catch (IOException e) {
|
// } catch (IOException e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user