arcade-mcp/libs/tests
Eric Gustin d7d765343e
Fix multiple worker log level bug (#758)
When running `arcade_mcp_server` with `workers > 1`, uvicorn spawns
worker subprocesses that directly call `create_arcade_mcp_factory()`
without going through `main()`. Since `setup_logging()` is only called
in `main()`, these subprocesses have no logging configuration, causing:

1. Standard Python logging not intercepted by Loguru
    
2. DEBUG-level logs from libraries like urllib3 appearing when OTEL is
enabled
    
3. Inconsistent log formats between main process and workers

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Touches process-wide logging initialization for uvicorn worker
subprocesses, which can affect log levels/handlers and output across the
server. Functional impact is limited to observability but could change
verbosity when OTEL or libraries emit logs.
> 
> **Overview**
> Fixes multi-worker/reload mode logging by configuring Loguru inside
`create_arcade_mcp_factory()` (using `ARCADE_MCP_DEBUG` to set `INFO` vs
`DEBUG`) so uvicorn-spawned worker subprocesses get the same
logging/interception as `main()`.
> 
> Adds regression tests that assert the factory filters DEBUG logs by
default and enables them when `ARCADE_MCP_DEBUG=true`, and bumps
`arcade-mcp-server` to `1.15.2`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
0c262eb9716ecbd589f1524842243a7aed80666e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-01-30 15:37:52 -08:00
..
arcade_evals Adding MCP Servers supports to Arcade Evals (#689) 2026-01-07 20:26:23 -03:00
arcade_mcp_server Fix multiple worker log level bug (#758) 2026-01-30 15:37:52 -08:00
cli Adding MCP Servers supports to Arcade Evals (#689) 2026-01-07 20:26:23 -03:00
core Four bug fixes (#754) 2026-01-29 15:12:06 -08:00
mcp MCP Local (#563) 2025-09-25 15:28:15 -07:00
sdk Adding MCP Servers supports to Arcade Evals (#689) 2026-01-07 20:26:23 -03:00
tool PagerDuty typed OAuth object (#718) 2025-12-15 17:42:11 -03:00
worker Adding MCP Servers supports to Arcade Evals (#689) 2026-01-07 20:26:23 -03:00
__init__.py 🏗️ Restructure: Multi-Package Architecture + uv Migration (#412) 2025-06-11 16:48:17 -07:00
conftest.py Adding MCP Servers supports to Arcade Evals (#689) 2026-01-07 20:26:23 -03:00