Read more about the Python logging module. In particular you may want to switch the file handler to a RotatingFileHandler to ensure log files don't grow too large. You may also want to change the logging level to record more than just errors.