refactor(logging): preserve tracebacks in remaining except blocks

Follow-up to PR #3651:

- Replace logger.error with logger.exception inside except blocks
  so stack traces are no longer lost:
  - providers/transcription.py (5 occurrences)
  - agent/tools/mcp.py (1 occurrence)

- Replace stdlib logging.getLogger with loguru logger in
  providers/openai_compat_provider.py for consistency.
This commit is contained in:
chengyongru
2026-05-07 13:06:59 +08:00
committed by Xubin Ren
parent 44a341335a
commit 9a8c4da0c4
3 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -616,7 +616,7 @@ async def connect_mcp_servers(
try:
result = await connect_single_server(name, cfg)
except Exception as e:
logger.error("MCP server '{}' connection failed: {}", name, e)
logger.exception("MCP server '{}' connection failed: {}", name, e)
continue
if result is not None and result[1] is not None:
server_stacks[result[0]] = result[1]