(logger: "logging.Logger", log_level: int)
return log_it
Before call strategy that logs to some logger the attempt.
Before call strategy that logs to some logger the attempt.
Before call strategy that logs to some logger the attempt .
def before_log(logger: "logging.Logger", log_level: int) -> typing.Callable[["RetryCallState"], None]:
    """Before call strategy that logs to some logger the attempt."""

    def log_it(retry_state: "RetryCallState") -> None:
        logger.log(
            log_level,
            f"Starting call to '{_utils.get_callback_name(retry_state.fn)}', "
            f"this is the {_utils.to_ordinal(retry_state.attempt_number)} time calling it.",
        )

    return log_it
def before_log ( logger : "logging.Logger" , log_level : int ) -> typing . Callable [ [ "RetryCallState" ] , None ] : def log_it ( retry_state : "RetryCallState" ) -> None : logger . log ( log_level , f"Starting call to '{_utils.get_callback_name(retry_state.fn)}', " f"this is the {_utils.to_ordinal(retry_state.attempt_number)} time calling it." , ) return log_it