def setup_logger(test, path='test.log'): test.log_handler = FileHandler(path) test.log_handler.push_application()