for handler in logging.root.handlers:
handler.addFilter(logging.Filter('foo'))
What is a correct way to filter different loggers using python logging?
http://stackoverflow.com/questions/17275334/what-is-a-correct-way-to-filter-different-loggers-using-python-logging