Fix up shell-log, yet again
This commit is contained in:
parent
e8bb002ff0
commit
74156cf2fc
1 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@ LOG_LEVELS = {
|
||||||
'error': logging.ERROR,
|
'error': logging.ERROR,
|
||||||
'warn': logging.WARNING,
|
'warn': logging.WARNING,
|
||||||
'info': logging.INFO,
|
'info': logging.INFO,
|
||||||
'debug': logging.DEBUG
|
'debug': logging.DEBUG,
|
||||||
}
|
}
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
|
@ -47,11 +47,11 @@ def main():
|
||||||
args = parse_args()
|
args = parse_args()
|
||||||
log = logger(args)
|
log = logger(args)
|
||||||
|
|
||||||
level = os.environ.get('SHELL_LOG_LEVEL', logging.INFO)
|
level = LOG_LEVELS[os.environ.get('SHELL_LOG_LEVEL', 'info')]
|
||||||
log.setLevel(level)
|
log.setLevel(level)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
message_log_level = LOG_LEVELS[args.level]
|
message_log_level = LOG_LEVELS[args.level]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
message_log_level = logging.INFO
|
message_log_level = logging.INFO
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue