fix(wassette): send log to stderr for stdio transport#86
Merged
Conversation
Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
Signed-off-by: Aaron Wislang <aaron.wislang@microsoft.com>
asw101
reviewed
Aug 5, 2025
Comment on lines
+204
to
+209
| let env_filter = tracing_subscriber::EnvFilter::try_from_default_env() | ||
| .unwrap_or_else(|_| { | ||
| "info,cranelift_codegen=warn,cranelift_entity=warn,cranelift_bforest=warn,cranelift_frontend=warn" | ||
| .to_string() | ||
| .into() | ||
| }); |
Member
There was a problem hiding this comment.
Suggested change
| let env_filter = tracing_subscriber::EnvFilter::try_from_default_env() | |
| .unwrap_or_else(|_| { | |
| "info,cranelift_codegen=warn,cranelift_entity=warn,cranelift_bforest=warn,cranelift_frontend=warn" | |
| .to_string() | |
| .into() | |
| }); | |
| let env_filter = | |
| tracing_subscriber::EnvFilter::try_from_default_env().unwrap_or_else(|_| { | |
| if env::var("RUST_LOG").is_ok() { | |
| "info,cranelift_codegen=warn,cranelift_entity=warn,cranelift_bforest=warn,cranelift_frontend=warn" | |
| .to_string() | |
| .into() | |
| } else { | |
| "warn,cranelift_codegen=warn,cranelift_entity=warn,cranelift_bforest=warn,cranelift_frontend=warn" | |
| .to_string() | |
| .into() | |
| } | |
| }); |
I've disabled ANSII escape codes but added this optional tweak. If RUST_LOG is set, we change the level from warn to info to get the logging depth we had before.
This is because VS Code will still output the following [warning] for any output on stderr.
2025-08-05 15:46:04.454 [warning] [server stderr] 2025-08-05T19:46:04.452371Z INFO handle_tools_list:get_component_tools: mcp_server::components: Total tools collected: 0
However, it is not trying to parse it, so I think it's OK to merge and leave as-is for now.
Member
|
Tested and looks great to me, thank you @Mossaka! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This closes #73
Signed-off-by: Jiaxiao Zhou duibao55328@gmail.com