code: def prepare_service(args=None):
      
      options.register_opts(cfg.CONF)
      services.load_service_opts(cfg.CONF)
      _configure(args)
      _setup_logging()
  
      cfg.CONF.log_opt_values(logging.getLogger(), logging.DEBUG)
docs: Configures application and setups logging.