issue #172: prevent 'No handlers..' error being printed.

This commit is contained in:
David Wilson 2018-03-30 01:10:30 +05:45
parent e0c4d6b348
commit 36e1ae15fd
1 changed files with 4 additions and 4 deletions

View File

@ -69,11 +69,11 @@ def setup():
"""
display = find_display()
if display.verbosity > 2:
logging.getLogger('ansible_mitogen').handlers = [Handler(display.v)]
logging.getLogger('ansible_mitogen').setLevel(logging.DEBUG)
logging.getLogger('ansible_mitogen').handlers = [Handler(display.vvv)]
mitogen.core.LOG.handlers = [Handler(display.vvv)]
mitogen.core.LOG.handlers = [Handler(display.vv)]
if display.verbosity > 2:
logging.getLogger('ansible_mitogen').setLevel(logging.DEBUG)
mitogen.core.LOG.setLevel(logging.DEBUG)
mitogen.core.IOLOG.handlers = [Handler(display.vvvv)]