diff --git a/aodh/evaluator/threshold.py b/aodh/evaluator/threshold.py index 53db5cefd..a67e513d1 100644 --- a/aodh/evaluator/threshold.py +++ b/aodh/evaluator/threshold.py @@ -134,8 +134,8 @@ class ThresholdEvaluator(evaluator.Evaluator): """ sufficient = len(statistics) >= alarm.rule['evaluation_periods'] if not sufficient and alarm.state != evaluator.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 diff --git a/aodh/storage/hbase/utils.py b/aodh/storage/hbase/utils.py index 9b01923a5..a7d3ca89b 100644 --- a/aodh/storage/hbase/utils.py +++ b/aodh/storage/hbase/utils.py @@ -227,9 +227,9 @@ def create_tables(conn, tables, column_families): separator=conn.table_prefix_separator, table_name=table)) - LOG.warn(_("Cannot create table %(table_name)s " - "it already exists. Ignoring error") - % {'table_name': table}) + LOG.warning(_("Cannot create table %(table_name)s " + "it already exists. Ignoring error") + % {'table_name': table}) def quote(s, *args): diff --git a/aodh/storage/mongo/utils.py b/aodh/storage/mongo/utils.py index f277edf75..8d3ebe291 100644 --- a/aodh/storage/mongo/utils.py +++ b/aodh/storage/mongo/utils.py @@ -82,8 +82,8 @@ class ConnectionPool(object): retry_interval, ) except pymongo.errors.ConnectionFailure as e: - LOG.warn(_('Unable to connect to the database server: ' - '%(errmsg)s.') % {'errmsg': e}) + LOG.warning(_('Unable to connect to the database server: ' + '%(errmsg)s.') % {'errmsg': e}) raise self._pool[pool_key] = weakref.ref(client) return client