

def tweak_logging():
    q = 0
    v = 0
    for arg in sys.argv[1:]:
        if arg.startswith('-v'):
            v += arg.count('v')
        if arg.startswith('-q'):
            q += arg.count('q')
    if (v >= 2):
        level = logging.INFO
        if (q >= 3):
            level = (logging.DEBUG - 1)
        logging.basicConfig(level=level)
    if (q > 0):
        global DEBUG
        DEBUG = False

dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/ndb/utils.py tweak_logging/VarMisuse@88/103 `v`->`q`