Stop logging full object in RPC push code
We already log the full object on the agent side and other server methods log important parts of the object so there isn't much to gain logging the full OVO components passed to this function's args. This adds a specific debug statement that just indicates the types, IDs, and revision_numbers being pushed out so they can still be correlated with received objects on the agent side. Partial-Bug: #1707307 Change-Id: I4499bb328f0aeb58fe583b83fb42cd2d26c1c4c1
This commit is contained in:
parent
7543948ea8
commit
2d8ffe2a08
|
@ -17,6 +17,7 @@ import collections
|
|||
|
||||
from neutron_lib import exceptions
|
||||
from oslo_log import helpers as log_helpers
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
|
||||
from neutron._i18n import _
|
||||
|
@ -30,6 +31,8 @@ from neutron.common import rpc as n_rpc
|
|||
from neutron.common import topics
|
||||
from neutron.objects import base as obj_base
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ResourcesRpcError(exceptions.NeutronException):
|
||||
pass
|
||||
|
@ -221,7 +224,6 @@ class ResourcesPushRpcApi(object):
|
|||
resources_by_type[resource_type].append(resource)
|
||||
return resources_by_type
|
||||
|
||||
@log_helpers.log_method_call
|
||||
def push(self, context, resource_list, event_type):
|
||||
"""Push an event and list of resources to agents, batched per type.
|
||||
When a list of different resource types is passed to this method,
|
||||
|
@ -230,6 +232,12 @@ class ResourcesPushRpcApi(object):
|
|||
"""
|
||||
|
||||
resources_by_type = self._classify_resources_by_type(resource_list)
|
||||
LOG.debug(
|
||||
"Pushing event %s for resources: %s", event_type,
|
||||
{t: ["ID=%s,revision_number=%s" % (
|
||||
obj.id, getattr(obj, 'revision_number', None))
|
||||
for obj in resources_by_type[t]]
|
||||
for t in resources_by_type})
|
||||
for resource_type, type_resources in resources_by_type.items():
|
||||
self._push(context, resource_type, type_resources, event_type)
|
||||
|
||||
|
|
Loading…
Reference in New Issue