Browse Source

Reduce number of logs

Do not print get-ports log if the result has only 1 port

Change-Id: Iab428b2461738aa918411455bf620cb88de53da6
changes/96/745496/1
asarfaty 12 months ago
committed by Adit Sarfaty
parent
commit
8a170a0cf8
  1. 5
      vmware_nsx/plugins/common/plugin.py

5
vmware_nsx/plugins/common/plugin.py

@ -452,10 +452,9 @@ class NsxPluginBase(db_base_plugin_v2.NeutronDbPluginV2,
sg_rule[sg_prefix.LOCAL_IP_PREFIX] = None
def _log_get_ports(self, ports, filters):
if len(ports) > 0:
LOG.debug("Getting %(num)s port%(plural)s with %(filters)s",
if len(ports) > 1:
LOG.debug("Getting %(num)s ports with %(filters)s",
{'num': len(ports),
'plural': 's' if len(ports) > 1 else '',
'filters': ('filters ' + str(filters) if filters
else 'no filters')})

Loading…
Cancel
Save