aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason Penilla <[email protected]>2024-04-27 11:41:56 -0700
committerJason Penilla <[email protected]>2024-04-27 11:41:56 -0700
commitf037f0803530109d156ac462c4b42f05f1708cfc (patch)
treeee51a5fb7bd1a5d1a5b585bb40fee1680aa67bfd
parent5731f346e2345f243105d6b08de25c5ce82d2177 (diff)
downloadPaper-f037f0803530109d156ac462c4b42f05f1708cfc.tar.gz
Paper-f037f0803530109d156ac462c4b42f05f1708cfc.zip
Unify plugin remapping debug flags
-rw-r--r--patches/server/0020-Plugin-remapping.patch10
1 files changed, 4 insertions, 6 deletions
diff --git a/patches/server/0020-Plugin-remapping.patch b/patches/server/0020-Plugin-remapping.patch
index 5ceee65ec1..ad8314314c 100644
--- a/patches/server/0020-Plugin-remapping.patch
+++ b/patches/server/0020-Plugin-remapping.patch
@@ -222,10 +222,10 @@ index 87128685015d550440a798028f50be24bc755f6c..8d0da6e46d4eb5eb05c3144510c4ef08
PaperPluginParent.PaperBootstrapProvider bootstrapPluginProvider = null;
diff --git a/src/main/java/io/papermc/paper/pluginremap/DebugLogger.java b/src/main/java/io/papermc/paper/pluginremap/DebugLogger.java
new file mode 100644
-index 0000000000000000000000000000000000000000..37024fe35f686490bba0df2e71d2198882e09db2
+index 0000000000000000000000000000000000000000..99e658e3a0f08dbd90b3cf48609613e8a085fd64
--- /dev/null
+++ b/src/main/java/io/papermc/paper/pluginremap/DebugLogger.java
-@@ -0,0 +1,65 @@
+@@ -0,0 +1,63 @@
+package io.papermc.paper.pluginremap;
+
+import java.io.IOException;
@@ -239,13 +239,11 @@ index 0000000000000000000000000000000000000000..37024fe35f686490bba0df2e71d21988
+
+/**
+ * {@link PrintWriter}-backed logger implementation for use with {@link net.neoforged.art.api.Renamer} which
-+ * only opens the backing writer and logs messages when the {@link #DEBUG} system property
++ * only opens the backing writer and logs messages when the {@link PluginRemapper#DEBUG_LOGGING} system property
+ * is set to true.
+ */
+@DefaultQualifier(NonNull.class)
+final class DebugLogger implements Consumer<String>, AutoCloseable {
-+ private static final boolean DEBUG = Boolean.getBoolean("paper.remap-debug");
-+
+ private final @Nullable PrintWriter writer;
+
+ DebugLogger(final Path logFile) {
@@ -282,7 +280,7 @@ index 0000000000000000000000000000000000000000..37024fe35f686490bba0df2e71d21988
+ }
+
+ private static @Nullable PrintWriter createWriter(final Path logFile) throws IOException {
-+ if (!DEBUG) {
++ if (!PluginRemapper.DEBUG_LOGGING) {
+ return null;
+ }
+ if (!Files.exists(logFile.getParent())) {