Minimally invasive set of logging fixes
- Cache structlog logger, make formatters generic
- Fix consul-specific naming in coordinator code
- Fix logging statements in envoyd that require formatting
- Clean up unicode-invalid binary strings from etcd
- Structured 'msg' key is removed by logging framework, change name
in a few places
- Move logging from INFO and above levels to DEBUG in a few places
Change-Id: Iea40f4969ad328f3d1180533dfc35cb9a2c0756b
diff --git a/voltha/coordinator.py b/voltha/coordinator.py
index 8fb083a..aaf8f77 100644
--- a/voltha/coordinator.py
+++ b/voltha/coordinator.py
@@ -274,7 +274,7 @@
try:
log.info('membership-record-before')
is_timeout, (_, record) = yield \
- self.consul_get_with_timeout(
+ self.coordinator_get_with_timeout(
key=self.membership_record_key,
index=0,
timeout=5)
@@ -427,7 +427,7 @@
# this shall return only when update is made to leader key
# or expires after 5 seconds wait
is_timeout, (tmp_index, updated) = yield \
- self.consul_get_with_timeout(
+ self.coordinator_get_with_timeout(
key=self.leader_prefix,
index=index,
timeout=5)
@@ -437,8 +437,8 @@
continue
# After timeout event the index returned from
- # consul_get_with_timeout is None. If we are here it's not a
- # timeout, therefore the index is a valid one.
+ # coordinator_get_with_timeout is None. If we are here it's
+ # not a timeout, therefore the index is a valid one.
index=tmp_index
if updated is None or updated != last:
@@ -568,7 +568,7 @@
returnValue(result)
@inlineCallbacks
- def consul_get_with_timeout(self, key, timeout, **kw):
+ def coordinator_get_with_timeout(self, key, timeout, **kw):
"""
Query consul with a timeout
:param key: Key to query