mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-11-22 23:48:15 -05:00
Fixed jANSI segfaulting the JVM when there is no console
This commit is contained in:
parent
59e9aa708d
commit
8baa02ec40
1 changed files with 3 additions and 1 deletions
|
@ -36,7 +36,9 @@ public class Logger {
|
|||
public static final PrintStream SYSERR = System.err;
|
||||
|
||||
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.setOut(new LoggerPrintStream("STDOUT", SYSOUT));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue