promote log level to warning for invalid event

In production environment, log level usually will not be DEBUG,
if event listener drops invalid event silently, it is hard to figure
out why alarm is not triggered.

This patch promotes log level to warning for such case.

Change-Id: Ia1c1142f89dd2d3cca12935973be2fd648e3250f
This commit is contained in:
ZhiQiang Fan 2016-04-25 04:05:11 +08:00
parent 04718ff382
commit 8122ee74d9

View File

@ -22,7 +22,7 @@ from oslo_utils import timeutils
import six
from aodh import evaluator
from aodh.i18n import _, _LE
from aodh.i18n import _, _LE, _LW
LOG = log.getLogger(__name__)
@ -167,7 +167,8 @@ class EventAlarmEvaluator(evaluator.Evaluator):
try:
event = Event(e)
except InvalidEvent:
LOG.debug('Aborting evaluation of the event.')
LOG.warning(_LW('Event <%s> is invalid, aborting evaluation '
'for it.'), e)
continue
for id, alarm in six.iteritems(