lsp: Fix noisy logs when starting language servers (#17713)

We would log every time we'd lookup a language server for a file and
we'd also log "starting language server" even though we were about to
only download it and not start it.


Release Notes:

- N/A
This commit is contained in:
Thorsten Ball 2024-09-11 12:56:39 -04:00 committed by GitHub
parent 13c553c50f
commit b5c42edf1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 11 deletions

View file

@ -833,7 +833,7 @@ impl LanguageRegistry {
) -> Option<PendingLanguageServer> {
let server_id = self.state.write().next_language_server_id();
log::info!(
"starting language server {:?}, path: {root_path:?}, id: {server_id}",
"attempting to start language server {:?}, path: {root_path:?}, id: {server_id}",
adapter.name.0
);

View file

@ -272,7 +272,7 @@ impl LanguageServer {
};
log::info!(
"starting language server. binary path: {:?}, working directory: {:?}, args: {:?}",
"starting language server process. binary path: {:?}, working directory: {:?}, args: {:?}",
binary.path,
working_dir,
&binary.arguments

View file

@ -26,7 +26,6 @@ use gpui::{
Task, WeakModel,
};
use http_client::{AsyncBody, Error, HttpClient, Request, Response, Uri};
use itertools::Itertools;
use language::{
language_settings::{
all_language_settings, language_settings, AllLanguageSettings, LanguageSettings,
@ -4489,14 +4488,6 @@ impl LspStore {
);
}
log::info!(
"starting language servers for {language}: {adapters}",
adapters = enabled_lsp_adapters
.iter()
.map(|adapter| adapter.name.0.as_ref())
.join(", ")
);
for adapter in &enabled_lsp_adapters {
self.start_language_server(worktree, adapter.clone(), language.clone(), cx);
}