3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 02:50:09 +01:00

Deprecate log4j logger method in Plugin

Dieser Commit ist enthalten in:
Riley Park 2022-01-19 18:39:08 -08:00
Ursprung c904da6eab
Commit 128691a963

Datei anzeigen

@ -27,10 +27,10 @@ index d8d459561cc75935136f8f9888ff27b45ad98f9e..001c2b963205012f340db0d539e4033c
implementation("org.ow2.asm:asm:9.2")
implementation("org.ow2.asm:asm-commons:9.2")
diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java
index 03ca87a1cbace2459174bb7bb8847bda766e80c5..c25fc646be750d3a3b2f4fb3f1c53daee5254107 100644
index 03ca87a1cbace2459174bb7bb8847bda766e80c5..34438b5362b0ba0949625d81e8371fe0d1f76fdf 100644
--- a/src/main/java/org/bukkit/plugin/Plugin.java
+++ b/src/main/java/org/bukkit/plugin/Plugin.java
@@ -179,6 +179,18 @@ public interface Plugin extends TabExecutor {
@@ -179,6 +179,22 @@ public interface Plugin extends TabExecutor {
@NotNull
public Logger getLogger();
@ -40,6 +40,10 @@ index 03ca87a1cbace2459174bb7bb8847bda766e80c5..c25fc646be750d3a3b2f4fb3f1c53dae
+ return org.slf4j.LoggerFactory.getLogger(getLogger().getName());
+ }
+
+ /**
+ * @deprecated use {@link #getSLF4JLogger()}
+ */
+ @Deprecated
+ @NotNull
+ default org.apache.logging.log4j.Logger getLog4JLogger() {
+ return org.apache.logging.log4j.LogManager.getLogger(getLogger().getName());