mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-11-22 11:55:24 +01:00
Fixed jANSI segfaulting the JVM when there is no console
This commit is contained in:
parent
59e9aa708d
commit
8baa02ec40
@ -36,7 +36,9 @@ public class Logger {
|
|||||||
public static final PrintStream SYSERR = System.err;
|
public static final PrintStream SYSERR = System.err;
|
||||||
|
|
||||||
public static void setup() {
|
public static void setup() {
|
||||||
AnsiConsole.systemInstall();
|
if (System.console() != null) { // jANSI is the best lib. If there is no console it just segfaults the JVM process. Thanks!
|
||||||
|
AnsiConsole.systemInstall();
|
||||||
|
}
|
||||||
System.setErr(new LoggerPrintStream("STDERR", SYSERR));
|
System.setErr(new LoggerPrintStream("STDERR", SYSERR));
|
||||||
System.setOut(new LoggerPrintStream("STDOUT", SYSOUT));
|
System.setOut(new LoggerPrintStream("STDOUT", SYSOUT));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user