summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheodoros Tsioutsias <theodoros.tsioutsias@cern.ch>2018-08-02 10:12:34 +0000
committerTheodoros Tsioutsias <theodoros.tsioutsias@cern.ch>2018-08-16 12:17:38 +0000
commit76ce8c07e1709371ad12add8db2d84b5829b1518 (patch)
treed3faaa39025d28d1fc7307bcc23987ff0063cca8
parent31fee4795b4784f7dda16c545006fb152b5c9bb8 (diff)
downloadtaskflow-76ce8c07e1709371ad12add8db2d84b5829b1518.tar.gz
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
-rw-r--r--taskflow/utils/kazoo_utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/taskflow/utils/kazoo_utils.py b/taskflow/utils/kazoo_utils.py
index 20146b4..6ff0ce6 100644
--- a/taskflow/utils/kazoo_utils.py
+++ b/taskflow/utils/kazoo_utils.py
@@ -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: