Skip to content
Snippets Groups Projects
Commit a4fc432d authored by David Douard's avatar David Douard
Browse files

tenacious proxy: Do not use f-strings for logging statements

parent 44834343
No related branches found
Tags v1.18.1
No related merge requests found
......@@ -143,8 +143,10 @@ class TenaciousProxyStorage:
except Exception as exc:
if len(objs) > 1:
logger.info(
f"{func_name}: failed to insert a batch of "
f"{len(objs)} {object_type} objects, splitting"
"%s: failed to insert a batch of %s %s objects, splitting",
func_name,
len(objs),
object_type,
)
# reinsert objs split in 2 parts at the end of to_add
to_add.append(objs[(len(objs) // 2) :])
......@@ -156,14 +158,18 @@ class TenaciousProxyStorage:
retries -= 1
if retries:
logger.info(
f"{func_name}: failed to insert an {object_type}, retrying"
"%s: failed to insert an %s, retrying",
func_name,
object_type,
)
# give it another chance
to_add.append(objs)
else:
logger.error(
f"{func_name}: failed to insert an object, "
f"excluding {objs} (from a batch of {n_objs})"
"%s: failed to insert an object, excluding %s (from a batch of %s)",
func_name,
objs,
n_objs,
)
logger.error(
"Exception was: %s",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment