Only log IDs of callbacks in debug message

Logging the ID of the callback should be enough
since the ID contains the path to the callback.

Before:
Notify callbacks
[('neutron.services.segments.db._update_segment_host_mapping_for_agent-8784700722903',
  <function _update_segment_host_mapping_for_agent at 0x7fd58f74ed70>)]
for agent, after_create _notify_loop"

After:
Notify callbacks
['neutron.services.segments.db._update_segment_host_mapping_for_agent-8784700722903']
for agent, after_create _notify_loop"

TrivialFix

Change-Id: I01d886f2707479183d7ae9c530f5f3b7b3963340
This commit is contained in:
Kevin Benton 2017-02-12 05:47:34 -08:00
parent 5735ea06b3
commit fa0188017a

View File

@ -139,7 +139,7 @@ class CallbacksManager(object):
errors = [] errors = []
callbacks = list(self._callbacks[resource].get(event, {}).items()) callbacks = list(self._callbacks[resource].get(event, {}).items())
LOG.debug("Notify callbacks %s for %s, %s", LOG.debug("Notify callbacks %s for %s, %s",
callbacks, resource, event) [c[0] for c in callbacks], resource, event)
# TODO(armax): consider using a GreenPile # TODO(armax): consider using a GreenPile
for callback_id, callback in callbacks: for callback_id, callback in callbacks:
try: try: