You can set up a wrapper function, passing the scoped logger as an argument, as seen in https://www.dataleadsfuture.com/conquer-retries-in-python-using-tenacity-an-end-to-end-tutorial/
Something like:
def my_scope_logger(logger): def my_log(retry_state): logger.log('something to log') return my_log
Then you can pass 'my_scope_logger' to the before callback in the retry decorator.