def process_flags(flags=None):
 if (flags is None):
  flags = []
 try:
  FLAGS(flags)
 except gflags.FlagsError as e:
  print(('%s\nUsage: %s ARGS\n%s' % (e, str(flags), FLAGS)))
  sys.exit(1)
 logging.getLogger().setLevel(getattr(logging, FLAGS.logging_level))

def process_flags ( flags = None ) : if ( flags is None ) : flags = [ ] try : FLAGS ( flags ) except gflags . FlagsError as e : print ( ( '%s\nUsage: %s ARGS\n%s' % ( e , str ( flags ) , FLAGS ) ) ) sys . exit ( 1 ) logging . getLogger ( ) . setLevel ( getattr ( logging , FLAGS . logging_level ) )
uses the command-line flags to set the logging level .