diff options
author | Zhang Qiang <qiang.z.zhang@intel.com> | 2012-09-26 05:15:52 +0800 |
---|---|---|
committer | Zhang Qiang <qiang.z.zhang@intel.com> | 2012-09-26 05:15:52 +0800 |
commit | 757be7c54e450ec23035ee019c952143ddfd86ba (patch) | |
tree | f0e259adc6f835157f96c8b4090b7595446faef7 | |
parent | 5c2df79cb330de317c31d7b43988fcbdd9a6ec0b (diff) | |
download | git-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.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |