Skip to content

Route diagnostics through stderr logging#80

Merged
xing5 merged 1 commit into
mainfrom
fix/logging-stdio-safety
May 14, 2026
Merged

Route diagnostics through stderr logging#80
xing5 merged 1 commit into
mainfrom
fix/logging-stdio-safety

Conversation

@xing5
Copy link
Copy Markdown
Owner

@xing5 xing5 commented May 14, 2026

Summary

  • Replace diagnostic print() calls with stdlib logging so MCP stdio stdout remains protocol-only.
  • Configure CLI logging in main() instead of at import time.
  • Disable Google API discovery file cache with cache_discovery=False.
  • Add regression tests that reject direct print() calls in server.py and verify main() writes no diagnostics to stdout.

Supersedes #73 and #79 for the stdio logging fix.

Test plan

  • uv run python -m unittest discover -s tests -p 'test_*.py'

@xing5 xing5 merged commit 2869443 into main May 14, 2026
2 checks passed
@xing5 xing5 deleted the fix/logging-stdio-safety branch May 14, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant