Reduce number of logs
Do not print get-ports log if the result has only 1 port Change-Id: Iab428b2461738aa918411455bf620cb88de53da6
This commit is contained in:
parent
f054e1b2ae
commit
8a170a0cf8
|
@ -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…
Reference in New Issue