From 0c5ce4673939c12216a287ce161e5fc846c9358a Mon Sep 17 00:00:00 2001 From: Shuangtai Tian Date: Wed, 26 Feb 2014 18:45:46 +0800 Subject: [PATCH] Add user-supplied arguments in log_handler When using PublishErrorsHandler, it will missing user-supplied arguments. For example, do LOG.info("blabla %s", "foo"), the payload only contains "blabla %s", but we expect it like "blabla foo". this bug has been fixed in oslo, just syncs it to ceilometer. Sync from Oslo, change-id: I91289cc4a60f5dab89bca852e6f52b4b83831e47 Change-Id: Ic2773035f6899e1ba7ec2813f79bd271dfa36b97 --- ceilometer/openstack/common/log_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceilometer/openstack/common/log_handler.py b/ceilometer/openstack/common/log_handler.py index 653f39833..da8945a9d 100644 --- a/ceilometer/openstack/common/log_handler.py +++ b/ceilometer/openstack/common/log_handler.py @@ -27,4 +27,4 @@ class PublishErrorsHandler(logging.Handler): notifier.api.notify(None, 'error.publisher', 'error_notification', notifier.api.ERROR, - dict(error=record.msg)) + dict(error=record.getMessage()))