(
    logger: "logging.Logger",
    log_level: int,
    sec_format: str = "%0.3f",
)
return log_it
After call strategy that logs to some logger the finished attempt.
After call strategy that logs to some logger the finished attempt.
After call strategy that logs to some logger the finished attempt .
def after_log(
    logger: "logging.Logger",
    log_level: int,
    sec_format: str = "%0.3f",
) -> typing.Callable[["RetryCallState"], None]:
    """After call strategy that logs to some logger the finished attempt."""

    def log_it(retry_state: "RetryCallState") -> None:
        logger.log(
            log_level,
            f"Finished call to '{_utils.get_callback_name(retry_state.fn)}' "
            f"after {sec_format % retry_state.seconds_since_start}(s), "
            f"this was the {_utils.to_ordinal(retry_state.attempt_number)} time calling it.",
        )

    return log_it
def after_log ( logger : "logging.Logger" , log_level : int , sec_format : str = "%0.3f" , ) -> typing . Callable [ [ "RetryCallState" ] , None ] : def log_it ( retry_state : "RetryCallState" ) -> None : logger . log ( log_level , f"Finished call to '{_utils.get_callback_name(retry_state.fn)}' " f"after {sec_format % retry_state.seconds_since_start}(s), " f"this was the {_utils.to_ordinal(retry_state.attempt_number)} time calling it." , ) return log_it