Skip to content

Conversation

@jonathanhefner
Copy link
Member

The "Logging in MCP Servers" section was copy-pasted across language tabs with examples from Python, JavaScript, and Go regardless of which tab the reader was viewing. Each tab now only references its own language:

  • Python: print() with file=sys.stderr workaround
  • TypeScript: console.log() / console.error()
  • Java: System.out.println()
  • Kotlin: Added missing logging section with println()
  • C#: Console.WriteLine()
  • Rust: println!() / print!()

🤖 Generated with Claude Code

@jonathanhefner jonathanhefner requested review from a team as code owners December 12, 2025 18:03

1. Use a logging library that writes to stderr or files, such as `tracing` or `log` in Rust.
2. Configure your logging framework to avoid stdout output.
- Use a logging library that writes to stderr or files.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonathanhefner looks like the recommended libraries were removed here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a Rust developer, but my understanding is that log and tracing are merely facades, and the user would need additional libraries to write to stderr or files. I will add them back though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I also updated the "Good" example to use eprintln! instead.

@jonathanhefner jonathanhefner force-pushed the build-server-tailor-logging-advice branch from 6487e47 to fb917e0 Compare December 12, 2025 22:02
The "Logging in MCP Servers" section was copy-pasted across language
tabs with examples from Python, JavaScript, and Go regardless of which
tab the reader was viewing. Each tab now only references its own
language:

- Python: `print()` with `file=sys.stderr` workaround
- TypeScript: `console.log()` / `console.error()`
- Java: `System.out.println()`
- Kotlin: Added missing logging section with `println()`
- C#: `Console.WriteLine()`
- Rust: `println!()` / `print!()`

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jonathanhefner jonathanhefner force-pushed the build-server-tailor-logging-advice branch from fb917e0 to baba570 Compare December 12, 2025 22:06
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.

2 participants