-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add error log for client stdio #924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add error log for client stdio #924
Conversation
Co-authored-by: Marcelo Trylesinski <[email protected]>
Resolved format issue. Please take a further look. @Kludex. THanks! |
…ersioned-urls Fix versioned URLs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @pengwa thanks for this contribution! And apologies for the time it took to get back to you on this.
Change looks good to me, let's just fix the duplicate logger instantiation - happy to get back to this quickly if you have bandwidth to make the update?
Thanks @felixweinberger , thanks for reminding me there is such a PR here. Just updated the code, feel free to review again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pengwa thanks for updating your PR.
Dismissing review as it's been addressed.
When use stdio mode, the server module is provided by developers (like me). But sometimes, the module not only call FastMCP().run(), but also other code. If the other code print something, then standard output will contains those text.
When stdio client read the standard output of the server module, it will fail to parse the content in expected content.
For example:
[50] Add mon5_log_handler to original_logger
is the log I printed by mistake before calling FastMCP().run().Motivation and Context
It is really hard to finally locate the root cause, so we need a better logging showing such error clearly.
How Has This Been Tested?
Tested in a stdio mode. Let me know if you have any suggestions on what else test to be covered.
Breaking Changes
NO!
Types of changes
Checklist
Additional context