Create KazooClient with taskflow logger

KazooClient should use the taskflow logger and not the default one.
Using the default logger means that the user cannot control its
log level

Change-Id: Id9549028522955ece0ae9f675c5ecc1c2fd816de
Closes-Bug: #1785036
This commit is contained in:
Theodoros Tsioutsias 2018-08-02 10:12:34 +00:00
parent 31fee4795b
commit 76ce8c07e1
1 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,10 @@ import six
from six.moves import zip as compat_zip
from taskflow import exceptions as exc
from taskflow import logging
LOG = logging.getLogger(__name__)
def _parse_hosts(hosts):
@ -186,6 +190,7 @@ def make_client(conf):
client_kwargs = {
'read_only': bool(conf.get('read_only')),
'randomize_hosts': bool(conf.get('randomize_hosts')),
'logger': LOG,
}
# See: https://kazoo.readthedocs.io/en/latest/api/retry.html
if 'command_retry' in conf: