aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0860-Fix-plugin-loggers-on-server-shutdown.patch
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2023-06-08 10:25:32 -0700
committerJake Potrebic <[email protected]>2023-06-08 10:25:32 -0700
commit870dafe358f4896c3628407093badfb4600fdc29 (patch)
treeb19b5a76f1b084ffb9ce5ffeef5d2b6ef0610330 /patches/server/0860-Fix-plugin-loggers-on-server-shutdown.patch
parent1a0280ccc061b692bfb251a5d90f0c98cd91c4c7 (diff)
downloadPaper-870dafe358f4896c3628407093badfb4600fdc29.tar.gz
Paper-870dafe358f4896c3628407093badfb4600fdc29.zip
add 1 more networking patch and add comments to dropped patches
Diffstat (limited to 'patches/server/0860-Fix-plugin-loggers-on-server-shutdown.patch')
-rw-r--r--patches/server/0860-Fix-plugin-loggers-on-server-shutdown.patch67
1 files changed, 0 insertions, 67 deletions
diff --git a/patches/server/0860-Fix-plugin-loggers-on-server-shutdown.patch b/patches/server/0860-Fix-plugin-loggers-on-server-shutdown.patch
deleted file mode 100644
index 0c9f365e19..0000000000
--- a/patches/server/0860-Fix-plugin-loggers-on-server-shutdown.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jos=C3=A9=20Miguel=20Moreno?= <[email protected]>
-Date: Sat, 5 Jun 2021 13:45:15 +0200
-Subject: [PATCH] Fix plugin loggers on server shutdown
-
-
-diff --git a/src/main/java/io/papermc/paper/log/CustomLogManager.java b/src/main/java/io/papermc/paper/log/CustomLogManager.java
-new file mode 100644
-index 0000000000000000000000000000000000000000..c1d3bac79bb8b4796c013ff4472f75dcd79602dc
---- /dev/null
-+++ b/src/main/java/io/papermc/paper/log/CustomLogManager.java
-@@ -0,0 +1,26 @@
-+package io.papermc.paper.log;
-+
-+import java.util.logging.LogManager;
-+
-+public class CustomLogManager extends LogManager {
-+ private static CustomLogManager instance;
-+
-+ public CustomLogManager() {
-+ instance = this;
-+ }
-+
-+ @Override
-+ public void reset() {
-+ // Ignore calls to this method
-+ }
-+
-+ private void superReset() {
-+ super.reset();
-+ }
-+
-+ public static void forceReset() {
-+ if (instance != null) {
-+ instance.superReset();
-+ }
-+ }
-+}
-diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 37441421a50867eeecf5cf3aed3e7096c526d7ef..2c3577c6f59e482d68c80d3d414ed43942dfcfbb 100644
---- a/src/main/java/net/minecraft/server/MinecraftServer.java
-+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1000,6 +1000,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- net.minecrell.terminalconsole.TerminalConsoleAppender.close(); // Paper - Use TerminalConsoleAppender
- } catch (Exception e) {
- }
-+ io.papermc.paper.log.CustomLogManager.forceReset(); // Paper - Reset loggers after shutdown
- this.onServerExit();
- // Paper end
- }
-diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index 9f1b363e1a6fa4925dc4560654af8426e6908c9d..717e292040ed7779eb4b6c5fa26665d3df9024e7 100644
---- a/src/main/java/org/bukkit/craftbukkit/Main.java
-+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
-@@ -18,6 +18,12 @@ public class Main {
- public static boolean useJline = true;
- public static boolean useConsole = true;
-
-+ // Paper start - Hijack log manager to ensure logging on shutdown
-+ static {
-+ System.setProperty("java.util.logging.manager", "io.papermc.paper.log.CustomLogManager");
-+ }
-+ // Paper end
-+
- public static void main(String[] args) {
- // Paper start
- final String warnWhenLegacyFormattingDetected = String.join(".", "net", "kyori", "adventure", "text", "warnWhenLegacyFormattingDetected");