From: Flavio Percoco Date: Fri, 22 Aug 2014 16:33:07 +0000 (+0200) Subject: Pass an empty context to the notifier X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=dbab8843ef33e0bb6745ae3ad5951fd86446c1a3;p=openstack-build%2Fcinder-build.git Pass an empty context to the notifier The notifier API expects a context as a first parameter. During the port to oslo.messaging, a bug was introduced here and the first argument in the notifier call was removed. This patch puts it back. Change-Id: Id2f47757ee4af8f8c39a8a1e6b11dcad163f5b7b Closes-bug: #1346466 --- diff --git a/cinder/openstack/common/log_handler.py b/cinder/openstack/common/log_handler.py index 37a7195dd..dcda5db2d 100644 --- a/cinder/openstack/common/log_handler.py +++ b/cinder/openstack/common/log_handler.py @@ -25,5 +25,6 @@ class PublishErrorsHandler(logging.Handler): if ('cinder.openstack.common.notifier.log_notifier' in cfg.CONF.notification_driver): return - rpc.get_notifier('error.publisher').info('error_notification', - dict(error=record.msg)) + msg = record.getMessage() + rpc.get_notifier('error.publisher').error(None, 'error_notification', + dict(error=msg))