+ Support ANSI color output on Linux / Mac

This commit is contained in:
Reinhard Pointner 2016-10-18 03:03:08 +08:00
parent 7b1146f168
commit 0d945f207e
1 changed files with 8 additions and 10 deletions

View File

@ -137,18 +137,16 @@ public final class Logging {
}
public Color getColor(int level) {
if (level >= Level.SEVERE.intValue())
return Color.CHERRY_RED;
if (level >= Level.WARNING.intValue())
return Color.ORANGE_RED;
if (level >= Level.INFO.intValue())
return null;
if (level >= Level.FINE.intValue())
return Color.ROYAL_BLUE;
if (level >= Level.FINEST.intValue())
if (level < Level.FINE.intValue())
return Color.LIME_GREEN;
if (level < Level.INFO.intValue())
return Color.ROYAL_BLUE;
if (level < Level.WARNING.intValue())
return null;
if (level < Level.SEVERE.intValue())
return Color.ORANGE_RED;
return Color.CHERRY_RED; // SEVERE
}
}