Don't create formatter if no log level set
parent
9f5555ec21
commit
6163d4e9ea
|
@ -67,8 +67,10 @@ def get_console_log(level: str = None, name: str = None) -> logging.Logger:
|
||||||
'''
|
'''
|
||||||
log = get_logger(name) # our root logger
|
log = get_logger(name) # our root logger
|
||||||
|
|
||||||
if level:
|
if not level:
|
||||||
log.setLevel(level.upper() if not isinstance(level, int) else level)
|
return
|
||||||
|
|
||||||
|
log.setLevel(level.upper() if not isinstance(level, int) else level)
|
||||||
|
|
||||||
if not any(
|
if not any(
|
||||||
handler.stream == sys.stderr for handler in log.handlers
|
handler.stream == sys.stderr for handler in log.handlers
|
||||||
|
|
Loading…
Reference in New Issue