reintroduced log_failure. Used in protocols. partial is not pickable in python 2.6