From 8122ee74d9a8727235f7676d808e83b83d9073d8 Mon Sep 17 00:00:00 2001 From: ZhiQiang Fan Date: Mon, 25 Apr 2016 04:05:11 +0800 Subject: [PATCH] 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 --- aodh/evaluator/event.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aodh/evaluator/event.py b/aodh/evaluator/event.py index 9e1fac3c4..c38f201c1 100644 --- a/aodh/evaluator/event.py +++ b/aodh/evaluator/event.py @@ -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(