mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-30 03:00:41 -04:00
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:
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user