From 36e1ae15fd881214c0a3230ff6ed736f7d12836c Mon Sep 17 00:00:00 2001 From: David Wilson Date: Fri, 30 Mar 2018 01:10:30 +0545 Subject: [PATCH] issue #172: prevent 'No handlers..' error being printed. --- ansible_mitogen/logging.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible_mitogen/logging.py b/ansible_mitogen/logging.py index dc12e452..3360051b 100644 --- a/ansible_mitogen/logging.py +++ b/ansible_mitogen/logging.py @@ -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)]