Convert warnings.warn call to logging.debug.