【修改】取消生成判分log文件

This commit is contained in:
huababa1
2025-07-26 20:31:33 +08:00
parent 59d504b33b
commit fe00f061b5
4 changed files with 32 additions and 32 deletions

View File

@@ -168,14 +168,14 @@ public class JudgementBrowerServiceImpl implements JudgementBrowerService {
* @param content 要写入的内容 * @param content 要写入的内容
*/ */
public static void appendToFile(String filePath, String content) { public static void appendToFile(String filePath, String content) {
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 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();
} // }
} }
} }

View File

@@ -2208,14 +2208,14 @@ public class IMysqlLocalServiceImpl implements IMysqlLocalService {
* @param content 要写入的内容 * @param content 要写入的内容
*/ */
public static void appendToFile(String filePath, String content) { public static void appendToFile(String filePath, String content) {
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 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();
} // }
} }
public static void appendToFile(String filePath, String format, Object... args) { public static void appendToFile(String filePath, String format, Object... args) {

View File

@@ -274,14 +274,14 @@ public class PsServiceImpl implements PsService{
} }
public static void appendToFile(String filePath, String content) { public static void appendToFile(String filePath, String content) {
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 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();
} // }
} }
} }

View File

@@ -136,13 +136,13 @@ public class FileServericeImpl implements IFileServerice {
* @param content 要写入的内容 * @param content 要写入的内容
*/ */
public static void appendToFile(String filePath, String content) { public static void appendToFile(String filePath, String content) {
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 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();
} // }
} }
} }