Fix plugin loggers on server shutdown
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,12 @@ public class Main {
|
||||
public static boolean useJline = true;
|
||||
public static boolean useConsole = true;
|
||||
|
||||
// Paper start - Reset loggers after shutdown
|
||||
static {
|
||||
System.setProperty("java.util.logging.manager", "io.papermc.paper.log.CustomLogManager");
|
||||
}
|
||||
// Paper end - Reset loggers after shutdown
|
||||
|
||||
public static void main(String[] args) {
|
||||
// Paper start
|
||||
final String warnWhenLegacyFormattingDetected = String.join(".", "net", "kyori", "adventure", "text", "warnWhenLegacyFormattingDetected");
|
||||
|
||||
Reference in New Issue
Block a user