parameters: (verbose_level)
docstring: Reconfigure logging level and format based on the verbose flag.
  
      :param verbose_level: number of `-v` flags received by the command
      :return: no return value
docstring_summary: Reconfigure logging level and format based on the verbose flag.
docstring_tokens: Reconfigure logging level and format based on the verbose flag .
function: def reconfigure_logging(verbose_level):
      """ Reconfigure logging level and format based on the verbose flag.
  
      :param verbose_level: number of `-v` flags received by the command
      :return: no return value
      """
      # Exit when nothing to do.
      if verbose_level == 0:
          return
  
      root = logging.getLogger()
      # Tune logging level.
      level = logging.WARNING - min(logging.WARNING, (10 * verbose_level))
      root.setLevel(level)
      # Be verbose with messages.
      if verbose_level <= 3:
          fmt_string = '%(name)s: %(levelname)s: %(message)s'
      else:
          fmt_string = '%(name)s: %(levelname)s: %(funcName)s: %(message)s'
      handler = logging.StreamHandler(sys.stdout)
      handler.setFormatter(logging.Formatter(fmt=fmt_string))
      root.handlers = [handler]
function_tokens: def reconfigure_logging ( verbose_level ) : # Exit when nothing to do. if verbose_level == 0 : return root = logging . getLogger ( ) # Tune logging level. level = logging . WARNING - min ( logging . WARNING , ( 10 * verbose_level ) ) root . setLevel ( level ) # Be verbose with messages. if verbose_level <= 3 : fmt_string = '%(name)s: %(levelname)s: %(message)s' else : fmt_string = '%(name)s: %(levelname)s: %(funcName)s: %(message)s' handler = logging . StreamHandler ( sys . stdout ) handler . setFormatter ( logging . Formatter ( fmt = fmt_string ) ) root . handlers = [ handler ]