code: def setup(product_name):
      
      if CONF.log_config:
          _load_log_config(CONF.log_config)
      else:
          _setup_logging_from_conf()
      sys.excepthook = _create_logging_excepthook(product_name)
docs: Setup logging.