Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
logs: Reduce log noise by using more debug logs (#20498)
Thorsten Ball93ab6ad9226f
diff --git a/crates/assistant/src/prompts.rs b/crates/assistant/src/prompts.rsindex 4d6d7ea3df9..131b908feb1 100644--- a/crates/assistant/src/prompts.rs+++ b/crates/assistant/src/prompts.rs@@ -149,7 +149,7 @@ impl PromptBuilder {if file_path.to_string_lossy().ends_with(".hbs") {if let Ok(content) = params.fs.load(&file_path).await {let file_name = file_path.file_stem().unwrap().to_string_lossy();- log::info!("Registering prompt template override: {}", file_name);+ log::debug!("Registering prompt template override: {}", file_name);handlebars.lock().register_template_string(&file_name, content).log_err();}}@@ -194,7 +194,7 @@ impl PromptBuilder {for path in Assets.list("prompts")? {if let Some(id) = path.split('/').last().and_then(|s| s.strip_suffix(".hbs")) {if let Some(prompt) = Assets.load(path.as_ref()).log_err().flatten() {- log::info!("Registering built-in prompt template: {}", id);+ log::debug!("Registering built-in prompt template: {}", id);let prompt = String::from_utf8_lossy(prompt.as_ref());handlebars.register_template_string(id, LineEnding::normalize_cow(prompt))?}diff --git a/crates/client/src/client.rs b/crates/client/src/client.rsindex b145ef99d00..1e73c7be668 100644--- a/crates/client/src/client.rs+++ b/crates/client/src/client.rs@@ -889,7 +889,7 @@ impl Client {cx: &AsyncAppContext,) -> Result<()> {let executor = cx.background_executor();- log::info!("add connection to peer");+ log::debug!("add connection to peer");let (connection_id, handle_io, mut incoming) = self.peer.add_connection(conn, {let executor = executor.clone();move |duration| executor.timer(duration)@@ -897,12 +897,12 @@ impl Client {let handle_io = executor.spawn(handle_io);let peer_id = async {- log::info!("waiting for server hello");+ log::debug!("waiting for server hello");let message = incoming.next().await.ok_or_else(|| anyhow!("no hello message received"))?;- log::info!("got server hello");+ log::debug!("got server hello");let hello_message_type_name = message.payload_type_name().to_string();let hello = message.into_any()@@ -928,7 +928,7 @@ impl Client {}};- log::info!(+ log::debug!("set status to connected (connection id: {:?}, peer id: {:?})",connection_id,peer_iddiff --git a/crates/reqwest_client/src/reqwest_client.rs b/crates/reqwest_client/src/reqwest_client.rsindex 08054a01287..9f43aa44e7e 100644--- a/crates/reqwest_client/src/reqwest_client.rs+++ b/crates/reqwest_client/src/reqwest_client.rs@@ -61,7 +61,7 @@ impl ReqwestClient {impl From<reqwest::Client> for ReqwestClient {fn from(client: reqwest::Client) -> Self {let handle = tokio::runtime::Handle::try_current().unwrap_or_else(|_| {- log::info!("no tokio runtime found, creating one for Reqwest...");+ log::debug!("no tokio runtime found, creating one for Reqwest...");let runtime = RUNTIME.get_or_init(|| {tokio::runtime::Builder::new_multi_thread()// Since we now have two executors, let's try to keep our footprint small