Replace deprecated LOG.warn with LOG.warning

LOG.warn is deprecated. It still used in a few places.
Updated to non-deprecated LOG.warning.

Change-Id: If8b3eaf651c784f7b67552188840237af1f1be42
Closes-Bug:#1508442
This commit is contained in:
Swapnil Kulkarni (coolsvap) 2016-03-11 13:18:12 +05:30
parent 3bc91f6f35
commit c837d22c6e
2 changed files with 5 additions and 4 deletions

View File

@ -88,7 +88,7 @@ class CoordinationMixin(object):
self._coordination_started = True
except Exception:
LOG.warn(_LW("Failed to start Coordinator:"),
LOG.warning(_LW("Failed to start Coordinator:"),
exc_info=True)
time.sleep(15)

View File

@ -710,9 +710,10 @@ class Service(service.RPCService, coordination.CoordinationMixin,
stale_zones = self.central_api.find_zones(context, stale_criterion)
if stale_zones:
LOG.warn(_LW('Found %(len)d zones PENDING for more than %(sec)d '
'seconds'), {'len': len(stale_zones),
'sec': self.max_prop_time})
LOG.warning(
_LW('Found %(len)d zones PENDING for more than %(sec)d '
'seconds'), {'len': len(stale_zones),
'sec': self.max_prop_time})
error_zones.extend(stale_zones)
return error_zones