When the publish_errors option is enabled, it will not work if the log notifier is enabled. The logic should be that this code doesn't run *only* for the log notifier. It should still work for all other notifiers if more than one is configured. Right now if multiple are configured and the log notifier is one of them, this feature doesn't work.
class PublishErrorsHandler(logging.Handler):
def emit(self, record):
if ('openstack.common.notifier.log_notifier' in
CONF.notification_driver):
return
notifier.api.notify(None, 'error.publisher',
'error_notification',
notifier.api.ERROR,
dict(error=record.msg))
Note that publish_errors is broken for other reasons, too: https://bugs.launchpad.net/nova/+bug/1023573
For reference, the check was added originally by: https:/ /review. openstack. org/4450