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:
parent
b12d862236
commit
cac80e2ebd
17 changed files with 23 additions and 38 deletions
|
@ -47,12 +47,9 @@ impl TerminalTool {
|
|||
}
|
||||
|
||||
if which::which("bash").is_ok() {
|
||||
log::info!("agent selected bash for terminal tool");
|
||||
"bash".into()
|
||||
} else {
|
||||
let shell = get_system_shell();
|
||||
log::info!("agent selected {shell} for terminal tool");
|
||||
shell
|
||||
get_system_shell()
|
||||
}
|
||||
});
|
||||
Self {
|
||||
|
|
|
@ -905,7 +905,7 @@ impl ContextStore {
|
|||
.into_iter()
|
||||
.filter(assistant_slash_commands::acceptable_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(
|
||||
assistant_slash_commands::ContextServerSlashCommand::new(
|
||||
context_server_store.clone(),
|
||||
|
|
|
@ -59,12 +59,9 @@ impl TerminalTool {
|
|||
}
|
||||
|
||||
if which::which("bash").is_ok() {
|
||||
log::info!("agent selected bash for terminal tool");
|
||||
"bash".into()
|
||||
} else {
|
||||
let shell = get_system_shell();
|
||||
log::info!("agent selected {shell} for terminal tool");
|
||||
shell
|
||||
get_system_shell()
|
||||
}
|
||||
});
|
||||
Self {
|
||||
|
|
|
@ -161,7 +161,7 @@ impl Client {
|
|||
working_directory: &Option<PathBuf>,
|
||||
cx: AsyncApp,
|
||||
) -> Result<Self> {
|
||||
log::info!(
|
||||
log::debug!(
|
||||
"starting context server (executable={:?}, args={:?})",
|
||||
binary.executable,
|
||||
&binary.args
|
||||
|
@ -295,7 +295,7 @@ impl Client {
|
|||
/// Continuously reads and logs any error messages from the server.
|
||||
async fn handle_err(transport: Arc<dyn Transport>) -> anyhow::Result<()> {
|
||||
while let Some(err) = transport.receive_err().next().await {
|
||||
log::warn!("context server stderr: {}", err.trim());
|
||||
log::debug!("context server stderr: {}", err.trim());
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
|
|
@ -137,7 +137,7 @@ impl ContextServer {
|
|||
}
|
||||
|
||||
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 client_info = types::Implementation {
|
||||
name: "Zed".to_string(),
|
||||
|
|
|
@ -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> {
|
||||
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)
|
||||
.with_db_initialization_query(DB_INITIALIZE_QUERY)
|
||||
.with_connection_initialize_query(CONNECTION_INITIALIZE_QUERY)
|
||||
|
|
|
@ -16606,10 +16606,7 @@ impl Editor {
|
|||
.transaction(transaction_id_prev)
|
||||
.map(|t| t.0.clone())
|
||||
})
|
||||
.unwrap_or_else(|| {
|
||||
log::info!("Failed to determine selections from before format. Falling back to selections when format was initiated");
|
||||
self.selections.disjoint_anchors()
|
||||
});
|
||||
.unwrap_or_else(|| self.selections.disjoint_anchors());
|
||||
|
||||
let mut timeout = cx.background_executor().timer(FORMAT_TIMEOUT).fuse();
|
||||
let format = project.update(cx, |project, cx| {
|
||||
|
|
|
@ -142,7 +142,7 @@ impl Arena {
|
|||
if self.current_chunk_index >= self.chunks.len() {
|
||||
self.chunks.push(Chunk::new(self.chunk_size));
|
||||
assert_eq!(self.current_chunk_index, self.chunks.len() - 1);
|
||||
log::info!(
|
||||
log::trace!(
|
||||
"increased element arena capacity to {}kb",
|
||||
self.capacity() / 1024,
|
||||
);
|
||||
|
|
|
@ -331,7 +331,7 @@ pub trait LspAdapter: 'static + Send + Sync {
|
|||
// for each worktree we might have open.
|
||||
if binary_options.allow_path_lookup
|
||||
&& 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: {:?}",
|
||||
self.name().0,
|
||||
binary.path,
|
||||
|
@ -601,7 +601,7 @@ async fn try_fetch_server_binary<L: LspAdapter + 'static + Send + Sync + ?Sized>
|
|||
}
|
||||
|
||||
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);
|
||||
|
||||
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())
|
||||
.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);
|
||||
Ok(binary)
|
||||
} else {
|
||||
|
|
|
@ -399,7 +399,6 @@ impl ContextServerStore {
|
|||
async move |this, cx| {
|
||||
match server.clone().start(cx).await {
|
||||
Ok(_) => {
|
||||
log::info!("Started {} context server", id);
|
||||
debug_assert!(server.client().is_some());
|
||||
|
||||
this.update(cx, |this, cx| {
|
||||
|
|
|
@ -63,7 +63,7 @@ impl registry::ContextServerDescriptor for ContextServerDescriptor {
|
|||
.await?;
|
||||
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 {
|
||||
path: command.command,
|
||||
|
|
|
@ -831,7 +831,6 @@ impl BreakpointStore {
|
|||
new_breakpoints.insert(path, breakpoints_for_file);
|
||||
}
|
||||
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)| {
|
||||
(path.to_string_lossy(), bp_in_file.breakpoints.len())
|
||||
}) {
|
||||
|
|
|
@ -296,7 +296,7 @@ impl LocalLspStore {
|
|||
let stderr_capture = Arc::new(Mutex::new(Some(String::new())));
|
||||
|
||||
let server_id = self.languages.next_language_server_id();
|
||||
log::info!(
|
||||
log::trace!(
|
||||
"attempting to start language server {:?}, path: {root_path:?}, id: {server_id}",
|
||||
adapter.name.0
|
||||
);
|
||||
|
@ -7529,7 +7529,7 @@ impl LspStore {
|
|||
.ok()
|
||||
.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
|
||||
// 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.
|
||||
|
|
|
@ -229,12 +229,12 @@ impl PromptBuilder {
|
|||
log_message.push_str(" -> ");
|
||||
log_message.push_str(&target.display().to_string());
|
||||
}
|
||||
log::info!("{}.", log_message);
|
||||
log::trace!("{}.", log_message);
|
||||
} else {
|
||||
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 {
|
||||
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(&target.display().to_string());
|
||||
}
|
||||
log::info!("{}.", log_message);
|
||||
log::trace!("{}.", log_message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ use std::{
|
|||
time::Duration,
|
||||
time::Instant,
|
||||
};
|
||||
use tracing::instrument;
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Serialize)]
|
||||
pub struct ConnectionId {
|
||||
|
@ -109,7 +108,6 @@ impl Peer {
|
|||
self.epoch.load(SeqCst)
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
pub fn add_connection<F, Fut, Out>(
|
||||
self: &Arc<Self>,
|
||||
connection: Connection,
|
||||
|
|
|
@ -2503,8 +2503,6 @@ impl Workspace {
|
|||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) -> Task<Vec<Option<anyhow::Result<Box<dyn ItemHandle>>>>> {
|
||||
log::info!("open paths {abs_paths:?}");
|
||||
|
||||
let fs = self.app_state.fs.clone();
|
||||
|
||||
// Sort the paths to ensure we add worktrees for parents before their children.
|
||||
|
|
|
@ -143,10 +143,10 @@ impl LicenseDetectionWatcher {
|
|||
}
|
||||
|
||||
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.
|
||||
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)"
|
||||
);
|
||||
return None;
|
||||
|
@ -159,11 +159,11 @@ impl LicenseDetectionWatcher {
|
|||
let text = fs.load(&abs_path).await.log_err()?;
|
||||
let is_eligible = is_license_eligible_for_data_collection(&text);
|
||||
if is_eligible {
|
||||
log::info!(
|
||||
log::debug!(
|
||||
"`{abs_path:?}` matches a license that is eligible for data collection (if enabled)"
|
||||
);
|
||||
} else {
|
||||
log::info!(
|
||||
log::debug!(
|
||||
"`{abs_path:?}` does not match a license that is eligible for data collection"
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue