From e0c4d6b34838e1440df2b166d8303bf69f279ec1 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Fri, 30 Mar 2018 00:13:22 +0545 Subject: [PATCH] ansible: Quick fix for #172. --- ansible_mitogen/logging.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ansible_mitogen/logging.py b/ansible_mitogen/logging.py index 672f2b99..dc12e452 100644 --- a/ansible_mitogen/logging.py +++ b/ansible_mitogen/logging.py @@ -69,11 +69,12 @@ def setup(): """ display = find_display() - logging.getLogger('ansible_mitogen').handlers = [Handler(display.v)] - logging.getLogger('ansible_mitogen').setLevel(logging.DEBUG) + if display.verbosity > 2: + logging.getLogger('ansible_mitogen').handlers = [Handler(display.v)] + logging.getLogger('ansible_mitogen').setLevel(logging.DEBUG) - mitogen.core.LOG.handlers = [Handler(display.v)] - mitogen.core.LOG.setLevel(logging.DEBUG) + mitogen.core.LOG.handlers = [Handler(display.vv)] + mitogen.core.LOG.setLevel(logging.DEBUG) mitogen.core.IOLOG.handlers = [Handler(display.vvvv)] if display.verbosity > 3: