fix(backend): use f-strings for DataError warning logs per backend convention

Switch %s placeholder style to f-strings in both logger.warning calls
(platform_cost.py and token_tracking.py) to match the backend logging
convention (f-strings for non-debug levels).
This commit is contained in:
Zamil Majdy
2026-04-08 22:30:51 +07:00
parent 04ed0e6a4d
commit 9710dc76fc
2 changed files with 6 additions and 12 deletions

View File

@@ -57,12 +57,9 @@ def _schedule_cost_log(entry: PlatformCostEntry) -> None:
# stale Prisma client (e.g. during a rolling deploy after a schema
# migration). Log at WARNING so Sentry is not spammed.
logger.warning(
"Skipping platform cost log (schema mismatch?) for "
"user=%s provider=%s block=%s: %s",
entry.user_id,
entry.provider,
entry.block_name,
e,
f"Skipping platform cost log (schema mismatch?) for "
f"user={entry.user_id} provider={entry.provider} "
f"block={entry.block_name}: {e}"
)
except Exception:
logger.exception(

View File

@@ -93,12 +93,9 @@ async def log_platform_cost_safe(entry: PlatformCostEntry) -> None:
# Prisma client (e.g. during a rolling deploy after a schema migration).
# Log at WARNING so Sentry is not spammed.
logger.warning(
"Skipping platform cost log (schema mismatch?) for "
"user=%s provider=%s block=%s: %s",
entry.user_id,
entry.provider,
entry.block_name,
e,
f"Skipping platform cost log (schema mismatch?) for "
f"user={entry.user_id} provider={entry.provider} "
f"block={entry.block_name}: {e}"
)
except Exception:
logger.exception(