summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Qiang <qiang.z.zhang@intel.com>2012-09-26 05:15:52 +0800
committerZhang Qiang <qiang.z.zhang@intel.com>2012-09-26 05:15:52 +0800
commit757be7c54e450ec23035ee019c952143ddfd86ba (patch)
treef0e259adc6f835157f96c8b4090b7595446faef7
parent5c2df79cb330de317c31d7b43988fcbdd9a6ec0b (diff)
downloadgit-buildpackage-757be7c54e450ec23035ee019c952143ddfd86ba.tar.gz
git-buildpackage-757be7c54e450ec23035ee019c952143ddfd86ba.tar.bz2
git-buildpackage-757be7c54e450ec23035ee019c952143ddfd86ba.zip
Logger: Add COLOR_YELLOW for warning message
and use 'warning' as prefix instead of 'warn' abbreviation, this is more reasonable, and can consist with gbs Change-Id: I89fff1f33397a5be779ea1089fbf6ff7666c40e6
-rw-r--r--gbp/log.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gbp/log.py b/gbp/log.py
index 9b351f9e..01034d10 100644
--- a/gbp/log.py
+++ b/gbp/log.py
@@ -27,7 +27,7 @@ class Logger(object):
DEBUG, INFO, WARNING, ERROR = range(4)
COLOR_NONE = 0
- COLOR_BLACK, COLOR_RED, COLOR_GREEN = range(30,33)
+ COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_YELLOW = range(30,34)
COLOR_SEQ = "\033[%dm"
BOLD_SEQ = "\033[1m"
@@ -41,7 +41,7 @@ class Logger(object):
def __init__(self):
self.levels = { self.DEBUG: [ 'debug', self.COLOR_GREEN ],
self.INFO: [ 'info', self.COLOR_GREEN ],
- self.WARNING: [ 'warn', self.COLOR_RED ],
+ self.WARNING: [ 'warning', self.COLOR_YELLOW ],
self.ERROR: [ 'error', self.COLOR_RED ], }
self.color = False
self.level = self.INFO