mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-30 09:44:24 +00:00
Drop debug lines before the platform binds
This commit is contained in:
1 parent
7c31231a77
commit
3b9cb4ce91
2 files changed
+28
No files matched your search
@@ -222,6 +222,11 @@ public final class IrisLogging {
|
||||
return ONCE_KEYS.add(key == null ? "null" : key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Without a bound platform the debug setting cannot be read, so debug lines are dropped as if it were off:
|
||||
* the Paper bootstrap runs pack loading before the plugin binds, and would otherwise print every loader
|
||||
* line to the console.
|
||||
*/
|
||||
private static void emit(LogLevel level, String message) {
|
||||
LogLevel target = level == null ? LogLevel.INFO : level;
|
||||
if (IrisPlatforms.isBound()) {
|
||||
@@ -229,6 +234,10 @@ public final class IrisLogging {
|
||||
return;
|
||||
}
|
||||
|
||||
if (target == LogLevel.DEBUG) {
|
||||
return;
|
||||
}
|
||||
|
||||
String output = clean(message);
|
||||
if (target == LogLevel.WARN || target == LogLevel.ERROR) {
|
||||
System.err.println("[Iris/" + target + "] " + output);
|
||||
|
||||
Reference in new issue
Block a user