def process_flags(flags=None):
    if flags is None:
        flags = []

    # Let the gflags module process the command-line arguments.
    try:
        FLAGS(flags)
    except gflags.FlagsError as e:
        print('%s\nUsage: %s ARGS\n%s' % (e, str(flags), FLAGS))
        sys.exit(1)

    # Set the logging according to the command-line flag.
    logging.getLogger().setLevel(getattr(logging, FLAGS.logging_level))
Uses the command-line flags to set the logging level.
dataset/ETHPy150Open pydata/pandas/pandas/io/auth.py/process_flags