-
Notifications
You must be signed in to change notification settings - Fork 102
mcp: Add example of using Middleware for logging purposes #58
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
mcp: Add example of using Middleware for logging purposes #58
Conversation
22d44b4
to
d87030f
Compare
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.
This should be a Go documentation example, not a separate program. See mcp/example_progress_test.go.
You won't need a lot of test infrastructure in that case. I would disable time output, and use the "// Output:" feature of examples for some very basic testing.
src/cmd/go/alldocs.go
If that doesn't work out for some reason, let me know and I'll reconsider.
Thank you @jba for taking a look! I will work on updating this evening. |
d87030f
to
accdc47
Compare
Sorry for the delay here @jba (I was out on vacation, and this slipped between the cracks); I've updated as you requested please take a look when you have time. |
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.
Looks awesome! Some minor tweaks.
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.
Thanks a lot!
Thank you for all of your help @jba! |
Motivation and Context
I needed to implement some logging for our experimental server that we are building out using the SDK, and figured I could propose an example that might make it easier for folks in the future.
For #33
How Has This Been Tested?
Implemented a small number of tests to ensure that the example continues to function over time.
Breaking Changes
N/A
Types of changes
Checklist
Additional context