[FIX] Fix log4j config unpacking (#704)

This commit is contained in:
zznty 2024-03-12 21:46:17 +07:00 committed by GitHub
parent 3e6af5afd3
commit ac6c312ed4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -37,7 +37,7 @@ private static void unpackLog4j() {
Path log4jConfigPath = Path.of("log4j2.xml");
if(!Files.exists(log4jConfigPath)) {
try(FileOutputStream output = new FileOutputStream(log4jConfigPath.toFile())) {
try(InputStream input = Main.class.getResourceAsStream("log4j2.xml")) {
try(InputStream input = Main.class.getResourceAsStream("/log4j2.xml")) {
if(input == null) {
return;
}