fix: mabe

This commit is contained in:
Chayapak 2024-11-04 19:06:43 +07:00
parent 783a7a937e
commit 4b16f12623
Signed by: ChomeNS
SSH key fingerprint: SHA256:0YoxhdyXsgbc0nfeB2N6FYE60mxMU7DS4uCUMaw2mvA

View file

@ -84,14 +84,14 @@ public class FileLoggerUtilities {
if (!Files.exists(logPath)) Files.createFile(logPath); if (!Files.exists(logPath)) Files.createFile(logPath);
logWriter = Files.newBufferedWriter(logPath, StandardCharsets.UTF_8, StandardOpenOption.TRUNCATE_EXISTING); logWriter = Files.newBufferedWriter(logPath, StandardCharsets.UTF_16, StandardOpenOption.TRUNCATE_EXISTING);
logWriter.write(currentLogDate.toString() + '\n'); logWriter.write(currentLogDate.toString() + '\n');
logWriter.flush(); logWriter.flush();
} }
public static void openLogFile() throws IOException { public static void openLogFile() throws IOException {
currentLogDate = LocalDate.parse(getLogDate(logPath)); currentLogDate = LocalDate.parse(getLogDate(logPath));
logWriter = Files.newBufferedWriter(logPath, StandardCharsets.UTF_8, StandardOpenOption.APPEND); logWriter = Files.newBufferedWriter(logPath, StandardCharsets.UTF_16, StandardOpenOption.APPEND);
} }
public static void compressLogFile() throws IOException { public static void compressLogFile() throws IOException {