From bed7b5d10e03b346eed2d7272627afe48ae6348c Mon Sep 17 00:00:00 2001 From: Konicai <71294714+Konicai@users.noreply.github.com> Date: Sat, 17 Jun 2023 11:47:42 -0400 Subject: [PATCH] Bump logj4 (#3888) --- bootstrap/standalone/build.gradle.kts | 6 ++---- .../geyser/platform/standalone/GeyserStandaloneLogger.java | 1 + bootstrap/standalone/src/main/resources/log4j2.xml | 4 ++-- gradle/libs.versions.toml | 6 +++--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/bootstrap/standalone/build.gradle.kts b/bootstrap/standalone/build.gradle.kts index b5fae9db3..eaf895108 100644 --- a/bootstrap/standalone/build.gradle.kts +++ b/bootstrap/standalone/build.gradle.kts @@ -7,10 +7,8 @@ dependencies { api(projects.core) implementation(libs.terminalconsoleappender) { - exclude("org.apache.logging.log4j", "log4j-core") - exclude("org.jline", "jline-reader") - exclude("org.jline", "jline-terminal") - exclude("org.jline", "jline-terminal-jna") + exclude("org.apache.logging.log4j") + exclude("org.jline") } implementation(libs.bundles.jline) diff --git a/bootstrap/standalone/src/main/java/org/geysermc/geyser/platform/standalone/GeyserStandaloneLogger.java b/bootstrap/standalone/src/main/java/org/geysermc/geyser/platform/standalone/GeyserStandaloneLogger.java index e7e24a465..3c29bc648 100644 --- a/bootstrap/standalone/src/main/java/org/geysermc/geyser/platform/standalone/GeyserStandaloneLogger.java +++ b/bootstrap/standalone/src/main/java/org/geysermc/geyser/platform/standalone/GeyserStandaloneLogger.java @@ -92,6 +92,7 @@ public class GeyserStandaloneLogger extends SimpleTerminalConsole implements Gey Configurator.setLevel(log.getName(), debug ? Level.DEBUG : Level.INFO); } + @Override public boolean isDebug() { return log.isDebugEnabled(); } diff --git a/bootstrap/standalone/src/main/resources/log4j2.xml b/bootstrap/standalone/src/main/resources/log4j2.xml index 0738acdcd..54f6f9528 100644 --- a/bootstrap/standalone/src/main/resources/log4j2.xml +++ b/bootstrap/standalone/src/main/resources/log4j2.xml @@ -2,10 +2,10 @@ - + - + diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d179c7576..31c732712 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -18,7 +18,7 @@ adventure = "4.14.0-20230424.215040-7" adventure-platform = "4.1.2" junit = "5.9.2" checkerframework = "3.19.0" -log4j = "2.17.1" +log4j = "2.20.0" jline = "3.21.0" terminalconsoleappender = "1.2.0" folia = "1.19.4-R0.1-SNAPSHOT" @@ -65,7 +65,7 @@ netty-transport-native-kqueue = { group = "io.netty", name = "netty-transport-na log4j-api = { group = "org.apache.logging.log4j", name = "log4j-api", version.ref = "log4j" } log4j-core = { group = "org.apache.logging.log4j", name = "log4j-core", version.ref = "log4j" } -log4j-slf4j18-impl = { group = "org.apache.logging.log4j", name = "log4j-slf4j18-impl", version.ref = "log4j" } +log4j-slf4j2-impl = { group = "org.apache.logging.log4j", name = "log4j-slf4j2-impl", version.ref = "log4j" } jline-terminal = { group = "org.jline", name = "jline-terminal", version.ref = "jline" } jline-terminal-jna = { group = "org.jline", name = "jline-terminal-jna", version.ref = "jline" } @@ -103,6 +103,6 @@ protocol-connection = { group = "org.cloudburstmc.protocol", name = "bedrock-con jackson = [ "jackson-annotations", "jackson-core", "jackson-dataformat-yaml" ] fastutil = [ "fastutil-int-int-maps", "fastutil-int-long-maps", "fastutil-int-byte-maps", "fastutil-int-boolean-maps", "fastutil-object-int-maps", "fastutil-object-object-maps" ] adventure = [ "adventure-text-serializer-gson", "adventure-text-serializer-legacy", "adventure-text-serializer-plain" ] -log4j = [ "log4j-api", "log4j-core", "log4j-slf4j18-impl" ] +log4j = [ "log4j-api", "log4j-core", "log4j-slf4j2-impl" ] jline = [ "jline-terminal", "jline-terminal-jna", "jline-reader" ] protocol = [ "protocol-common", "protocol-codec", "protocol-connection" ]