code: def configure(conf, default_config=None):
      
      if conf.logconfig and os.path.isfile(conf.logconfig):
          logging.config.fileConfig(conf.logconfig,
                                    disable_existing_loggers=False)
      elif default_config and os.path.isfile(default_config):
          logging.config.fileConfig(default_config,
                                    disable_existing_loggers=False)
      else:
          init_console_logging(conf)
docs: Configure logging based on log config file.
  
      Turn on console logging if no logging files found
  
      :param conf: object with configuration namespace (argparse parser)