Merge "Sync the log_handler from oslo"

This commit is contained in:
Jenkins 2014-03-05 01:55:53 +00:00 committed by Gerrit Code Review
commit cb66a0ffc5

View File

@ -1,5 +1,3 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -13,12 +11,13 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import logging
from ironic.openstack.common import notifier
from oslo.config import cfg
from ironic.openstack.common import notifier
class PublishErrorsHandler(logging.Handler):
def emit(self, record):
@ -28,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()))