removed naming conflict from previous commit, thanks Paolo

This commit is contained in:
mdipierro
2019-04-11 21:18:36 -07:00
parent 33335ec3e1
commit 2fbaced689
+4 -4
View File
@@ -1022,12 +1022,12 @@ def start(cron=True):
# streaming on sys.stdout or sys.stderr
loggers = [logging.getLogger()]
loggers.extend(logging.Logger.manager.loggerDict.values())
for logger in loggers:
if isinstance(logger, logging.PlaceHolder): continue
for h in logger.handlers[:]:
for l in loggers:
if isinstance(l, logging.PlaceHolder): continue
for h in l.handlers[:]:
if isinstance(h, logging.StreamHandler) and \
h.stream in (sys.stdout, sys.stderr):
logger.removeHandler(h)
l.removeHandler(h)
# NOTE: stderr.write() is still working
logger.setLevel(options.debuglevel)