From 0d945f207eae13fbd846b6f5a2e732e704ac0f5a Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Tue, 18 Oct 2016 03:03:08 +0800 Subject: [PATCH] + Support ANSI color output on Linux / Mac --- source/net/filebot/Logging.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/source/net/filebot/Logging.java b/source/net/filebot/Logging.java index 7b78b08d..611835b3 100644 --- a/source/net/filebot/Logging.java +++ b/source/net/filebot/Logging.java @@ -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 null; + return Color.CHERRY_RED; // SEVERE } }