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: I151710c566cac93c502cedf61988613110a70e32
Closes-Bug:#1508442
This commit is contained in:
Swapnil Kulkarni (coolsvap) 2016-03-11 12:51:04 +05:30
parent 592f221e66
commit a9c38d2b8a
2 changed files with 6 additions and 6 deletions

View File

@ -191,8 +191,8 @@ class ThresholdEvaluator(evaluator.Evaluator):
return
if state == evaluator.UNKNOWN and not unknown:
LOG.warn(_LW('Expecting %(expected)d datapoints but only get '
'%(actual)d') % {
LOG.warning(_LW('Expecting %(expected)d datapoints but only get '
'%(actual)d') % {
'expected': alarm.rule['evaluation_periods'],
'actual': len(statistics)})
# Reason is not same as log message because we want to keep

View File

@ -115,10 +115,10 @@ def register_keystoneauth_opts(conf):
def setup_keystoneauth(conf):
if conf[CFG_GROUP].auth_type == "password-aodh-legacy":
LOG.warn("Value 'password-aodh-legacy' for '[%s]/auth_type' "
"is deprecated. And will be removed in Aodh 3.0. "
"Use 'password' instead.",
CFG_GROUP)
LOG.warning("Value 'password-aodh-legacy' for '[%s]/auth_type' "
"is deprecated. And will be removed in Aodh 3.0. "
"Use 'password' instead.",
CFG_GROUP)
ka_loading.load_auth_from_conf_options(conf, CFG_GROUP)