Delay string interpolations at logging calls
Fix two places where we were constructing strings even if we might not log them. Change-Id: I854094d4e31b834a51e7acfa34d6c9eccef9ab53
This commit is contained in:
parent
b882a7f69d
commit
2225062837
|
@ -305,9 +305,8 @@ class OvnProviderHelper(object):
|
|||
self._update_status_to_octavia(status)
|
||||
self.requests.task_done()
|
||||
except driver_exceptions.UpdateStatusError as e:
|
||||
msg = ("Error while updating the load balancer "
|
||||
"status: %s") % e.fault_string
|
||||
LOG.error(msg)
|
||||
LOG.error("Error while updating the load balancer status: %s",
|
||||
e.fault_string)
|
||||
# TODO(haleyb): The resource(s) we were updating status for
|
||||
# should be cleaned-up
|
||||
except Exception:
|
||||
|
@ -540,11 +539,9 @@ class OvnProviderHelper(object):
|
|||
[lr.strip() for lr in lr_ref.split(',')]
|
||||
if r != ovn_lr.name]
|
||||
except ValueError:
|
||||
msg = ('The loadbalancer %(lb)s is not associated with '
|
||||
'the router %(router)s' %
|
||||
{'lb': ovn_lb.name,
|
||||
'router': ovn_lr.name})
|
||||
LOG.warning(msg)
|
||||
LOG.warning('The loadbalancer %(lb)s is not associated with '
|
||||
'the router %(router)s',
|
||||
{'lb': ovn_lb.name, 'router': ovn_lr.name})
|
||||
if lr_ref:
|
||||
commands.append(
|
||||
self.ovn_nbdb_api.db_set(
|
||||
|
|
Loading…
Reference in New Issue