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