Emit message which merged user-supplied argument in log_handler

Sync from Oslo, change-id: I91289cc4a60f5dab89bca852e6f52b4b83831e47

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 patch fix it.

Change-Id: I375b0d83783b1866d3bf30ff3ade27e746bb856b
Closes-bug: #1278291
This commit is contained in:
gtt116 2014-02-21 09:52:55 +08:00
parent 50d3ddaedc
commit 1fb1b05821

View File

@ -26,4 +26,4 @@ class PublishErrorsHandler(logging.Handler):
notifier.api.notify(None, 'error.publisher',
'error_notification',
notifier.api.ERROR,
dict(error=record.msg))
dict(error=record.getMessage()))