def discardLogs():
    """
    Discard messages logged via the global C{logfile} object.
    """
    global logfile
    logfile = NullFile()

    Discard messages logged via the global C{logfile} object.
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/log.py