Skip to content

Commit

Permalink
truncate file if it already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
tballison committed Sep 29, 2023
1 parent d764f8f commit c8f69cb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ public void writeLog4j2() throws IOException {
Files.createDirectories(AppContext.ASYNC_LOG4J2_PATH.getParent());
}
Files.writeString(AppContext.ASYNC_LOG4J2_PATH, template, StandardCharsets.UTF_8,
StandardOpenOption.CREATE);
StandardOpenOption.TRUNCATE_EXISTING);

//not actually a template
String xml = getTemplateLog4j2("log4j2-async-cli.xml");
Files.writeString(AppContext.CONFIG_PATH.resolve("log4j2-async-cli.xml"), xml,
StandardCharsets.UTF_8, StandardOpenOption.CREATE);
StandardCharsets.UTF_8, StandardOpenOption.TRUNCATE_EXISTING);

}

Expand Down

0 comments on commit c8f69cb

Please sign in to comment.