From dbab8843ef33e0bb6745ae3ad5951fd86446c1a3 Mon Sep 17 00:00:00 2001 From: Flavio Percoco Date: Fri, 22 Aug 2014 18:33:07 +0200 Subject: [PATCH] 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 --- cinder/openstack/common/log_handler.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)) -- 2.45.2