Silence a bucketload of logs (#36534)

Closes #ISSUE

Release Notes:

- Silenced a bunch of logs that were on by default
This commit is contained in:
Conrad Irwin 2025-08-19 20:26:56 -06:00 committed by GitHub
parent b12d862236
commit cac80e2ebd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 23 additions and 38 deletions

View file

@ -47,12 +47,9 @@ impl TerminalTool {
} }
if which::which("bash").is_ok() { if which::which("bash").is_ok() {
log::info!("agent selected bash for terminal tool");
"bash".into() "bash".into()
} else { } else {
let shell = get_system_shell(); get_system_shell()
log::info!("agent selected {shell} for terminal tool");
shell
} }
}); });
Self { Self {

View file

@ -905,7 +905,7 @@ impl ContextStore {
.into_iter() .into_iter()
.filter(assistant_slash_commands::acceptable_prompt) .filter(assistant_slash_commands::acceptable_prompt)
.map(|prompt| { .map(|prompt| {
log::info!("registering context server command: {:?}", prompt.name); log::debug!("registering context server command: {:?}", prompt.name);
slash_command_working_set.insert(Arc::new( slash_command_working_set.insert(Arc::new(
assistant_slash_commands::ContextServerSlashCommand::new( assistant_slash_commands::ContextServerSlashCommand::new(
context_server_store.clone(), context_server_store.clone(),

View file

@ -59,12 +59,9 @@ impl TerminalTool {
} }
if which::which("bash").is_ok() { if which::which("bash").is_ok() {
log::info!("agent selected bash for terminal tool");
"bash".into() "bash".into()
} else { } else {
let shell = get_system_shell(); get_system_shell()
log::info!("agent selected {shell} for terminal tool");
shell
} }
}); });
Self { Self {

View file

@ -161,7 +161,7 @@ impl Client {
working_directory: &Option<PathBuf>, working_directory: &Option<PathBuf>,
cx: AsyncApp, cx: AsyncApp,
) -> Result<Self> { ) -> Result<Self> {
log::info!( log::debug!(
"starting context server (executable={:?}, args={:?})", "starting context server (executable={:?}, args={:?})",
binary.executable, binary.executable,
&binary.args &binary.args
@ -295,7 +295,7 @@ impl Client {
/// Continuously reads and logs any error messages from the server. /// Continuously reads and logs any error messages from the server.
async fn handle_err(transport: Arc<dyn Transport>) -> anyhow::Result<()> { async fn handle_err(transport: Arc<dyn Transport>) -> anyhow::Result<()> {
while let Some(err) = transport.receive_err().next().await { while let Some(err) = transport.receive_err().next().await {
log::warn!("context server stderr: {}", err.trim()); log::debug!("context server stderr: {}", err.trim());
} }
Ok(()) Ok(())

View file

@ -137,7 +137,7 @@ impl ContextServer {
} }
async fn initialize(&self, client: Client) -> Result<()> { async fn initialize(&self, client: Client) -> Result<()> {
log::info!("starting context server {}", self.id); log::debug!("starting context server {}", self.id);
let protocol = crate::protocol::ModelContextProtocol::new(client); let protocol = crate::protocol::ModelContextProtocol::new(client);
let client_info = types::Implementation { let client_info = types::Implementation {
name: "Zed".to_string(), name: "Zed".to_string(),

View file

@ -74,7 +74,7 @@ pub async fn open_db<M: Migrator + 'static>(db_dir: &Path, scope: &str) -> Threa
} }
async fn open_main_db<M: Migrator>(db_path: &Path) -> Option<ThreadSafeConnection> { async fn open_main_db<M: Migrator>(db_path: &Path) -> Option<ThreadSafeConnection> {
log::info!("Opening database {}", db_path.display()); log::trace!("Opening database {}", db_path.display());
ThreadSafeConnection::builder::<M>(db_path.to_string_lossy().as_ref(), true) ThreadSafeConnection::builder::<M>(db_path.to_string_lossy().as_ref(), true)
.with_db_initialization_query(DB_INITIALIZE_QUERY) .with_db_initialization_query(DB_INITIALIZE_QUERY)
.with_connection_initialize_query(CONNECTION_INITIALIZE_QUERY) .with_connection_initialize_query(CONNECTION_INITIALIZE_QUERY)

View file

@ -16606,10 +16606,7 @@ impl Editor {
.transaction(transaction_id_prev) .transaction(transaction_id_prev)
.map(|t| t.0.clone()) .map(|t| t.0.clone())
}) })
.unwrap_or_else(|| { .unwrap_or_else(|| self.selections.disjoint_anchors());
log::info!("Failed to determine selections from before format. Falling back to selections when format was initiated");
self.selections.disjoint_anchors()
});
let mut timeout = cx.background_executor().timer(FORMAT_TIMEOUT).fuse(); let mut timeout = cx.background_executor().timer(FORMAT_TIMEOUT).fuse();
let format = project.update(cx, |project, cx| { let format = project.update(cx, |project, cx| {

View file

@ -142,7 +142,7 @@ impl Arena {
if self.current_chunk_index >= self.chunks.len() { if self.current_chunk_index >= self.chunks.len() {
self.chunks.push(Chunk::new(self.chunk_size)); self.chunks.push(Chunk::new(self.chunk_size));
assert_eq!(self.current_chunk_index, self.chunks.len() - 1); assert_eq!(self.current_chunk_index, self.chunks.len() - 1);
log::info!( log::trace!(
"increased element arena capacity to {}kb", "increased element arena capacity to {}kb",
self.capacity() / 1024, self.capacity() / 1024,
); );

View file

@ -331,7 +331,7 @@ pub trait LspAdapter: 'static + Send + Sync {
// for each worktree we might have open. // for each worktree we might have open.
if binary_options.allow_path_lookup if binary_options.allow_path_lookup
&& let Some(binary) = self.check_if_user_installed(delegate.as_ref(), toolchains, cx).await { && let Some(binary) = self.check_if_user_installed(delegate.as_ref(), toolchains, cx).await {
log::info!( log::debug!(
"found user-installed language server for {}. path: {:?}, arguments: {:?}", "found user-installed language server for {}. path: {:?}, arguments: {:?}",
self.name().0, self.name().0,
binary.path, binary.path,
@ -601,7 +601,7 @@ async fn try_fetch_server_binary<L: LspAdapter + 'static + Send + Sync + ?Sized>
} }
let name = adapter.name(); let name = adapter.name();
log::info!("fetching latest version of language server {:?}", name.0); log::debug!("fetching latest version of language server {:?}", name.0);
delegate.update_status(name.clone(), BinaryStatus::CheckingForUpdate); delegate.update_status(name.clone(), BinaryStatus::CheckingForUpdate);
let latest_version = adapter let latest_version = adapter
@ -612,7 +612,7 @@ async fn try_fetch_server_binary<L: LspAdapter + 'static + Send + Sync + ?Sized>
.check_if_version_installed(latest_version.as_ref(), &container_dir, delegate.as_ref()) .check_if_version_installed(latest_version.as_ref(), &container_dir, delegate.as_ref())
.await .await
{ {
log::info!("language server {:?} is already installed", name.0); log::debug!("language server {:?} is already installed", name.0);
delegate.update_status(name.clone(), BinaryStatus::None); delegate.update_status(name.clone(), BinaryStatus::None);
Ok(binary) Ok(binary)
} else { } else {

View file

@ -399,7 +399,6 @@ impl ContextServerStore {
async move |this, cx| { async move |this, cx| {
match server.clone().start(cx).await { match server.clone().start(cx).await {
Ok(_) => { Ok(_) => {
log::info!("Started {} context server", id);
debug_assert!(server.client().is_some()); debug_assert!(server.client().is_some());
this.update(cx, |this, cx| { this.update(cx, |this, cx| {

View file

@ -63,7 +63,7 @@ impl registry::ContextServerDescriptor for ContextServerDescriptor {
.await?; .await?;
command.command = extension.path_from_extension(&command.command); command.command = extension.path_from_extension(&command.command);
log::info!("loaded command for context server {id}: {command:?}"); log::debug!("loaded command for context server {id}: {command:?}");
Ok(ContextServerCommand { Ok(ContextServerCommand {
path: command.command, path: command.command,

View file

@ -831,7 +831,6 @@ impl BreakpointStore {
new_breakpoints.insert(path, breakpoints_for_file); new_breakpoints.insert(path, breakpoints_for_file);
} }
this.update(cx, |this, cx| { this.update(cx, |this, cx| {
log::info!("Finish deserializing breakpoints & initializing breakpoint store");
for (path, count) in new_breakpoints.iter().map(|(path, bp_in_file)| { for (path, count) in new_breakpoints.iter().map(|(path, bp_in_file)| {
(path.to_string_lossy(), bp_in_file.breakpoints.len()) (path.to_string_lossy(), bp_in_file.breakpoints.len())
}) { }) {

View file

@ -296,7 +296,7 @@ impl LocalLspStore {
let stderr_capture = Arc::new(Mutex::new(Some(String::new()))); let stderr_capture = Arc::new(Mutex::new(Some(String::new())));
let server_id = self.languages.next_language_server_id(); let server_id = self.languages.next_language_server_id();
log::info!( log::trace!(
"attempting to start language server {:?}, path: {root_path:?}, id: {server_id}", "attempting to start language server {:?}, path: {root_path:?}, id: {server_id}",
adapter.name.0 adapter.name.0
); );
@ -7529,7 +7529,7 @@ impl LspStore {
.ok() .ok()
.flatten()?; .flatten()?;
log::info!("Refreshing workspace configurations for servers {refreshed_servers:?}"); log::debug!("Refreshing workspace configurations for servers {refreshed_servers:?}");
// TODO this asynchronous job runs concurrently with extension (de)registration and may take enough time for a certain extension // TODO this asynchronous job runs concurrently with extension (de)registration and may take enough time for a certain extension
// to stop and unregister its language server wrapper. // to stop and unregister its language server wrapper.
// This is racy : an extension might have already removed all `local.language_servers` state, but here we `.clone()` and hold onto it anyway. // This is racy : an extension might have already removed all `local.language_servers` state, but here we `.clone()` and hold onto it anyway.

View file

@ -229,12 +229,12 @@ impl PromptBuilder {
log_message.push_str(" -> "); log_message.push_str(" -> ");
log_message.push_str(&target.display().to_string()); log_message.push_str(&target.display().to_string());
} }
log::info!("{}.", log_message); log::trace!("{}.", log_message);
} else { } else {
if !found_dir_once { if !found_dir_once {
log::info!("No prompt template overrides directory found at {}. Using built-in prompts.", templates_dir.display()); log::trace!("No prompt template overrides directory found at {}. Using built-in prompts.", templates_dir.display());
if let Some(target) = symlink_status { if let Some(target) = symlink_status {
log::info!("Symlink found pointing to {}, but target is invalid.", target.display()); log::trace!("Symlink found pointing to {}, but target is invalid.", target.display());
} }
} }
@ -247,7 +247,7 @@ impl PromptBuilder {
log_message.push_str(" -> "); log_message.push_str(" -> ");
log_message.push_str(&target.display().to_string()); log_message.push_str(&target.display().to_string());
} }
log::info!("{}.", log_message); log::trace!("{}.", log_message);
break; break;
} }
} }

View file

@ -26,7 +26,6 @@ use std::{
time::Duration, time::Duration,
time::Instant, time::Instant,
}; };
use tracing::instrument;
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Serialize)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Serialize)]
pub struct ConnectionId { pub struct ConnectionId {
@ -109,7 +108,6 @@ impl Peer {
self.epoch.load(SeqCst) self.epoch.load(SeqCst)
} }
#[instrument(skip_all)]
pub fn add_connection<F, Fut, Out>( pub fn add_connection<F, Fut, Out>(
self: &Arc<Self>, self: &Arc<Self>,
connection: Connection, connection: Connection,

View file

@ -2503,8 +2503,6 @@ impl Workspace {
window: &mut Window, window: &mut Window,
cx: &mut Context<Self>, cx: &mut Context<Self>,
) -> Task<Vec<Option<anyhow::Result<Box<dyn ItemHandle>>>>> { ) -> Task<Vec<Option<anyhow::Result<Box<dyn ItemHandle>>>>> {
log::info!("open paths {abs_paths:?}");
let fs = self.app_state.fs.clone(); let fs = self.app_state.fs.clone();
// Sort the paths to ensure we add worktrees for parents before their children. // Sort the paths to ensure we add worktrees for parents before their children.

View file

@ -143,10 +143,10 @@ impl LicenseDetectionWatcher {
} }
async fn is_path_eligible(fs: &Arc<dyn Fs>, abs_path: PathBuf) -> Option<bool> { async fn is_path_eligible(fs: &Arc<dyn Fs>, abs_path: PathBuf) -> Option<bool> {
log::info!("checking if `{abs_path:?}` is an open source license"); log::debug!("checking if `{abs_path:?}` is an open source license");
// Resolve symlinks so that the file size from metadata is correct. // Resolve symlinks so that the file size from metadata is correct.
let Some(abs_path) = fs.canonicalize(&abs_path).await.ok() else { let Some(abs_path) = fs.canonicalize(&abs_path).await.ok() else {
log::info!( log::debug!(
"`{abs_path:?}` license file probably deleted (error canonicalizing the path)" "`{abs_path:?}` license file probably deleted (error canonicalizing the path)"
); );
return None; return None;
@ -159,11 +159,11 @@ impl LicenseDetectionWatcher {
let text = fs.load(&abs_path).await.log_err()?; let text = fs.load(&abs_path).await.log_err()?;
let is_eligible = is_license_eligible_for_data_collection(&text); let is_eligible = is_license_eligible_for_data_collection(&text);
if is_eligible { if is_eligible {
log::info!( log::debug!(
"`{abs_path:?}` matches a license that is eligible for data collection (if enabled)" "`{abs_path:?}` matches a license that is eligible for data collection (if enabled)"
); );
} else { } else {
log::info!( log::debug!(
"`{abs_path:?}` does not match a license that is eligible for data collection" "`{abs_path:?}` does not match a license that is eligible for data collection"
); );
} }