[fix] Fix display of 'INFO' messages in --verbose

This commit is contained in:
Alexandre Aubin 2017-10-29 23:12:34 +01:00
parent 4f31cf0044
commit 013e1155f9
2 changed files with 2 additions and 1 deletions

View file

@ -35,6 +35,7 @@
"unknown_group": "Unknown '{group}' group",
"unknown_user": "Unknown '{user}' user",
"values_mismatch": "Values don't match",
"info": "Info:",
"warning": "Warning:",
"websocket_request_expected": "Expected a WebSocket request",
"cannot_open_file": "Could not open file {file:s} (reason: {error:s})",

View file

@ -182,7 +182,7 @@ class TTYHandler(logging.StreamHandler):
if self.level <= log.DEBUG:
# add level name before message
level = '%s ' % record.levelname
elif record.levelname in ['SUCCESS', 'WARNING', 'ERROR']:
elif record.levelname in ['SUCCESS', 'WARNING', 'ERROR', 'INFO']:
# add translated level name before message
level = '%s ' % m18n.g(record.levelname.lower())
color = self.LEVELS_COLOR.get(record.levelno, 'white')