Port twisted.python.logfile to Python 3