github_mcp/core/log_transport.rs
1// GitHub v3 REST API MCP server — generated by mcpify. Do not hand-edit.
2
3use std::io::IsTerminal;
4
5/// Pretty-printed to an interactive TTY, structured JSON otherwise
6/// (containers/CI) — mirrors `targets::typescript`'s `log-transport.ts`
7/// TTY-detection logic. Checks stderr, not stdout: that's where logs are
8/// actually written (see `logger::init_logging`), since stdout is reserved
9/// for the MCP stdio transport's JSON-RPC frames.
10pub fn use_pretty_output() -> bool {
11 std::io::stderr().is_terminal()
12}