no message

This commit is contained in:
huababa1
2025-08-01 17:38:04 +08:00
parent 8430fde91d
commit a0696cc20a

View File

@@ -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();
} // }
} }
} }