fix: use standard logging format to avoid reserved 'message' key

Python's logging.LogRecord reserves 'message' as an attribute.
Using it in extra dict causes KeyError.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Matt 2025-12-07 11:59:18 +01:00
parent 68694ca3c4
commit 4527c85e3d
1 changed files with 2 additions and 5 deletions

View File

@ -131,11 +131,8 @@ async def get_current_agent_compat(
# Fall back to legacy Bearer token authentication
if authorization:
logger.warning(
"deprecated_auth_scheme",
extra={
"message": "Bearer token auth is deprecated. Use X-Agent-Id and X-Agent-Secret headers.",
"agent_id": str(agent_id) if agent_id else None,
},
"deprecated_auth_scheme: Bearer token auth is deprecated. Use X-Agent-Id and X-Agent-Secret headers. agent_id=%s",
str(agent_id) if agent_id else None,
)
# Parse Bearer token