mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-08 08:02:13 -07:00
Make PluginProviderContext#getLogger return ComponentLogger, remove PluginProviderContext#getSLF4JLogger (#8921)
This commit is contained in:
@@ -250,11 +250,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+package io.papermc.paper.plugin.bootstrap;
|
||||
+
|
||||
+import io.papermc.paper.plugin.configuration.PluginMeta;
|
||||
+import net.kyori.adventure.text.logger.slf4j.ComponentLogger;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+import java.nio.file.Path;
|
||||
+import java.util.logging.Logger;
|
||||
+
|
||||
+/**
|
||||
+ * Represents the context provided to a {@link PluginBootstrap} during both the bootstrapping and plugin
|
||||
@@ -288,17 +288,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @return the logger instance
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ Logger getLogger();
|
||||
+ ComponentLogger getLogger();
|
||||
+
|
||||
+ /**
|
||||
+ * Provides the SLF4J logger assigned to this plugin.
|
||||
+ *
|
||||
+ * @return SLF4J logger
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ default org.slf4j.Logger getSLF4JLogger() {
|
||||
+ return org.slf4j.LoggerFactory.getLogger(this.getLogger().getName());
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/configuration/PluginMeta.java b/src/main/java/io/papermc/paper/plugin/configuration/PluginMeta.java
|
||||
new file mode 100644
|
||||
|
Reference in New Issue
Block a user