|
|
@ -53,6 +53,7 @@ public abstract class AnsiLog {
|
|
|
|
private static final String ERROR_COLOR_PREFIX = "[" + colorStr("ERROR", RED) + "] ";
|
|
|
|
private static final String ERROR_COLOR_PREFIX = "[" + colorStr("ERROR", RED) + "] ";
|
|
|
|
|
|
|
|
|
|
|
|
static {
|
|
|
|
static {
|
|
|
|
|
|
|
|
try {
|
|
|
|
if (System.console() != null) {
|
|
|
|
if (System.console() != null) {
|
|
|
|
enableColor = true;
|
|
|
|
enableColor = true;
|
|
|
|
// windows dos, do not support color
|
|
|
|
// windows dos, do not support color
|
|
|
@ -64,6 +65,9 @@ public abstract class AnsiLog {
|
|
|
|
if (OSUtils.isCygwinOrMinGW()) {
|
|
|
|
if (OSUtils.isCygwinOrMinGW()) {
|
|
|
|
enableColor = true;
|
|
|
|
enableColor = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (Throwable t) {
|
|
|
|
|
|
|
|
// ignore
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private AnsiLog() {
|
|
|
|
private AnsiLog() {
|
|
|
|