【修改】取消生成判分log文件
This commit is contained in:
@@ -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();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -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) {
|
||||||
|
@@ -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();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -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();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user