File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
loader/src/main/java/com/fox2code/foxloader/launcher Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -295,8 +295,7 @@ public static void notifyJAnsiInstalled() {
295295 }
296296
297297 public static boolean wantJAnsi () {
298- return hasLogger && LoggerHelper .consoleSupportColor &&
299- (LoggerHelper .devEnvironment || !isClient ());
298+ return hasLogger && LoggerHelper .wantJAnsi ;
300299 }
301300
302301 public static boolean hasAnsi () {
Original file line number Diff line number Diff line change @@ -37,13 +37,19 @@ final class LoggerHelper {
3737 private static final String formatDefault = "[%1$tT] [%2$-7s] %3$s" ;
3838 private static final String formatClient = "[%1$tT] [CLIENT] [%2$-7s] %3$s" ;
3939 private static final String formatServer = "[%1$tT] [SERVER] [%2$-7s] %3$s" ;
40+ private static final boolean hasConsoleObject = System .console () != null ;
4041 static final boolean devEnvironment = FoxLauncher .DEVELOPING_FOXLOADER || FoxLauncher .DEV_MODE ;
4142 static final boolean consoleSupportColor = devEnvironment ||
42- Boolean .getBoolean ("foxloader.console-support-color" ) || System . console () != null ;
43+ Boolean .getBoolean ("foxloader.console-support-color" ) || hasConsoleObject ;
4344 private static final boolean disableLoggerHelper =
4445 Boolean .getBoolean ("foxloader.disable-logger-helper" );
4546 private static final boolean loggerDistinguishSide =
4647 Boolean .getBoolean ("foxloader.logger-distinguish-side" );
48+ static final boolean wantJAnsi = (consoleSupportColor && hasConsoleObject &&
49+ (!disableLoggerHelper ) && (!devEnvironment ) &&
50+ // Always allow the JVM Flags to work
51+ !Boolean .getBoolean ("foxloader.force-ignore-jansi" )) ||
52+ Boolean .getBoolean ("foxloader.force-use-jansi" );
4753 private static final String format = loggerDistinguishSide ?
4854 FoxLauncher .isServer () ? formatServer : formatClient : formatDefault ;
4955 private static final FoxLoaderLogFormatter simpleFormatter = new FoxLoaderLogFormatter ();
You can’t perform that action at this time.
0 commit comments