def _setup_logging_from_conf(product_name):
log_root = getLogger(product_name).logger -> log_root is not truly root logger here. so the handler removing will fail to work if we already have default handlers in root logger.
for handler in log_root.handlers:
log_root.removeHandler(handler)
# I think we should prevent log_root to propagate by log_root.propagate = 0, this will make the product logger work as root for our loggers in other codes
if CONF.use_syslog:
facility = _find_facility_from_conf()
syslog = logging.handlers.SysLogHandler(address='/dev/log',
facility=facility)
log_root.addHandler(syslog)
Fix proposed to branch: master /review. openstack. org/15085
Review: https:/