fix: makeNewLogFile() in FileLoggerUtilities appending to the file instead of deleting the existing one
This commit is contained in:
parent
3811790c93
commit
4f8d5bfff5
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ public class FileLoggerUtilities {
|
||||||
|
|
||||||
public static synchronized void makeNewLogFile() throws IOException {
|
public static synchronized void makeNewLogFile() throws IOException {
|
||||||
currentLogDate = LocalDate.now();
|
currentLogDate = LocalDate.now();
|
||||||
logWriter = new OutputStreamWriter(Files.newOutputStream(logPath, StandardOpenOption.CREATE, StandardOpenOption.APPEND), StandardCharsets.UTF_8);
|
logWriter = new OutputStreamWriter(Files.newOutputStream(logPath, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING), StandardCharsets.UTF_8);
|
||||||
logWriter.write(currentLogDate.toString() + '\n');
|
logWriter.write(currentLogDate.toString() + '\n');
|
||||||
logWriter.flush();
|
logWriter.flush();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue