From 3319eea00ee2b8a5d042099e11ce2b13bf439a39 Mon Sep 17 00:00:00 2001 From: Alfredo Gallardo Date: Wed, 28 May 2025 21:37:06 -0400 Subject: [PATCH 1/2] refactor: comment out tracing subscriber initialization to prevent log errors in certain applications --- apps/mcp-proxy-server/src/main.rs | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/apps/mcp-proxy-server/src/main.rs b/apps/mcp-proxy-server/src/main.rs index cc949a24..8edfb8d3 100644 --- a/apps/mcp-proxy-server/src/main.rs +++ b/apps/mcp-proxy-server/src/main.rs @@ -16,15 +16,21 @@ struct Args { #[tokio::main] async fn main() -> Result<()> { - tracing_subscriber::fmt() - .with_env_filter(EnvFilter::from_default_env().add_directive(tracing::Level::DEBUG.into())) - .with_target(false) - .with_thread_ids(true) - .with_file(true) - .with_line_number(true) - .with_writer(std::io::stderr) - .with_ansi(false) - .init(); + /* + In most cases we can use this tracing subscriber using the stderr as writer + BUT + there are some apps like IntelliJ products that flag an mcp server as errored + when found any error in the logs. + */ + // tracing_subscriber::fmt() + // .with_env_filter(EnvFilter::from_default_env().add_directive(tracing::Level::DEBUG.into())) + // .with_target(false) + // .with_thread_ids(true) + // .with_file(true) + // .with_line_number(true) + // .with_writer(std::io::stderr) + // .with_ansi(false) + // .init(); tracing::info!("Starting MCP Dockmaster Proxy Server"); From 4163fb1e327bb7a7e4f190fb2e2a0b810477ce7f Mon Sep 17 00:00:00 2001 From: Alfredo Gallardo Date: Wed, 28 May 2025 21:46:38 -0400 Subject: [PATCH 2/2] fix: lin error on unusedi mport --- apps/mcp-proxy-server/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/mcp-proxy-server/src/main.rs b/apps/mcp-proxy-server/src/main.rs index 8edfb8d3..2f83e7a6 100644 --- a/apps/mcp-proxy-server/src/main.rs +++ b/apps/mcp-proxy-server/src/main.rs @@ -2,7 +2,7 @@ use anyhow::Result; use clap::Parser; use rmcp::{ServiceExt, transport::stdio}; use server::mcp_proxy_client::get_mcp_client; -use tracing_subscriber::{self, EnvFilter}; +// use tracing_subscriber::{self, EnvFilter}; pub mod server;