Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
Fix log message formatting when classes not owned by plugins use sysout (#6604)
Dieser Commit ist enthalten in:
Ursprung
79e52a51bd
Commit
89c648bcd7
@ -6,7 +6,7 @@ Subject: [PATCH] Add System.out/err catcher
|
|||||||
|
|
||||||
diff --git a/src/main/java/io/papermc/paper/logging/SysoutCatcher.java b/src/main/java/io/papermc/paper/logging/SysoutCatcher.java
|
diff --git a/src/main/java/io/papermc/paper/logging/SysoutCatcher.java b/src/main/java/io/papermc/paper/logging/SysoutCatcher.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..88608afed45f25f822121214f87e9f9b53143104
|
index 0000000000000000000000000000000000000000..76d0d00cd6742991e3f3ec827a75ee87d856b6c9
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/logging/SysoutCatcher.java
|
+++ b/src/main/java/io/papermc/paper/logging/SysoutCatcher.java
|
||||||
@@ -0,0 +1,94 @@
|
@@ -0,0 +1,94 @@
|
||||||
@ -94,7 +94,7 @@ index 0000000000000000000000000000000000000000..88608afed45f25f822121214f87e9f9b
|
|||||||
+ } catch (final IllegalArgumentException | IllegalStateException e) {
|
+ } catch (final IllegalArgumentException | IllegalStateException e) {
|
||||||
+ // If anything happens, the calling class doesn't exist, there is no JavaPlugin that "owns" the calling class, etc
|
+ // If anything happens, the calling class doesn't exist, there is no JavaPlugin that "owns" the calling class, etc
|
||||||
+ // Just print out normally, with some added information
|
+ // Just print out normally, with some added information
|
||||||
+ Bukkit.getLogger().log(this.level, String.format("[%s] %s %s", this.prefix, clazz.getName(), line));
|
+ Bukkit.getLogger().log(this.level, String.format("%s[%s] %s", this.prefix, clazz.getName(), line));
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren