-
Notifications
You must be signed in to change notification settings - Fork 98
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
chore: reduce noisy logging #83
base: main
Are you sure you want to change the base?
Conversation
9a51eef
to
b3d9724
Compare
Sounds reasonable. But I think things like conncetion establishment and initialization, those happen once per conncetion, deserve a info level log, while request/notification/result indeed should be downgraded to debug level. And serve loop inner event should have a trace level. Is it acceptable? After all you can configure @jokemanfire What's your opinion on this? |
Yeah. We could do that. I just have some data from customers who do 100B requests per month, and in these cases the only logs you care about is if something goes awry in the code and needs engineer attention. So maybe consider that here too, it's great when you play around with it, but deploying it to the big customers and suddenly they start asking why we log so much :) |
As you said, I believe that the logs for initializing the server should not be downgraded, but the logs in the process are suitable for downgrading, just like most services do. We can carefully examine which logs are suitable for downgrading.And we need to separate which logs are worth warning about. |
I think valuable logs should not be missed just to reduce the number of logs. Changing all logs to debug level, although it will reduce the number of logs, especially all debug logs, will make developers ignore many valuable logs. |
I agree with both parties. The issue is that when using this as a library, the consumer needs to be able to control the logging. |
How about this? code like this ,just wrap in a func? This way, both the generation and debugging environments can meet the requirements. And use env like VERBOSE.
|
In general adding magic env vars for logging is not a great idea as they can be hard to discover. I agree with all points made here, but I think the ability to set |
I will tune the log level with a new PR in several days |
b3d9724
to
6874317
Compare
Motivation and Context
For our users, it's not super polite to spam log messages for everything that happens in the MCP server. We should make these to the debug level, including one warning that was about LLM hallucinating more than anything being seriously broken in the MCP server.
The info/warn/error channels should be more quiet, because in a busy server they will hide actually important logs.
How Has This Been Tested?
Tried it out in our server, saw reduced amount of logs.
Breaking Changes
Nope.
Types of changes
Checklist
Additional context
If this is not what you want, let's work together to calm down the logs a bit. It's rough to fork a project this early and then rebase fixes every week...