From 30bec802aad5531df87d6eb6c20517cc52324354 Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Fri, 14 Sep 2018 08:10:40 -0700 Subject: [PATCH] [infer] more terminal colors for the Infer reports Summary: Display the errors report as red in the termninal, warnings as yellow, advice as blue and the like as green. Reviewed By: mbouaziz Differential Revision: D9828302 fbshipit-source-id: 30315eac2 --- infer/lib/python/inferlib/colorize.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/infer/lib/python/inferlib/colorize.py b/infer/lib/python/inferlib/colorize.py index 5b2147d92..e9277fb7d 100644 --- a/infer/lib/python/inferlib/colorize.py +++ b/infer/lib/python/inferlib/colorize.py @@ -34,18 +34,20 @@ MAGENTA = terminal_only('\033[35m') MAGENTA_BG = terminal_only('\033[45m') BRIGHT = terminal_only('\033[1m') DIM = terminal_only('\033[2m') +GREEN = terminal_only('\033[32m') RED = terminal_only('\033[31m') RESET = terminal_only('\033[0m') WHITE = terminal_only('\033[37m') WHITE_BG = terminal_only('\033[47m') -YELLOW = terminal_only('\033[35m') +YELLOW = terminal_only('\033[33m') -ERROR = RED HEADER = BRIGHT SUCCESS = BLUE_BG + WHITE + BRIGHT -WARNING = '' -ADVICE = '' -LIKE = '' + +ERROR = RED +WARNING = YELLOW +ADVICE = BLUE +LIKE = GREEN class Invalid_mode(Exception):