Sync log_handler module from Oslo

Ibf28ba17f Remove the notifier and its dependencies from log.py

Move the code related to the publish error handler out of the
log module so its easier for other projects to consume it

Closes-bug: #1240349
Change-Id: Ib97bc01b60d7ea6c2e6bc3f0229deffbadbf18cc
Merge "Sync log_handler module from Oslo"