Make more readable
This commit is contained in:
parent
75fac93544
commit
63447d1ec3
1 changed files with 7 additions and 4 deletions
|
@ -242,11 +242,14 @@ def run_daemon(args: list, conf: Config):
|
||||||
|
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
|
|
||||||
log.setLevel(logging.DEBUG if args.verbose == [] else logging.INFO)
|
log.setLevel(logging.INFO)
|
||||||
for module in args.verbose or []:
|
if args.verbose is not None:
|
||||||
logging.getLogger(module).setLevel(logging.DEBUG)
|
|
||||||
if isinstance(args.verbose, list):
|
|
||||||
loop.set_debug(True)
|
loop.set_debug(True)
|
||||||
|
if len(args.verbose) > 0:
|
||||||
|
for module in args.verbose:
|
||||||
|
logging.getLogger(module).setLevel(logging.DEBUG)
|
||||||
|
else:
|
||||||
|
log.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
if conf.share_usage_data:
|
if conf.share_usage_data:
|
||||||
loggly_handler = get_loggly_handler()
|
loggly_handler = get_loggly_handler()
|
||||||
|
|
Loading…
Reference in a new issue