Less log spam (non git worktrees; saving with no LSP) (#29557)

- See: https://github.com/zed-industries/zed/discussions/29541
- `failed to get git blame data:` occurred whenever opening a file that
does not have git blame data and with `git.inline_blame.enabled` = true
(the default). Notably this would be triggered whenever you opened your
settings or keymap (unless ~/.config/zed was git managed).
- `No language server found to format buffer` triggered whenever you
saved a buffer with `format_on_save` (the default for most languages)
but had no LSP configured for this file type (e.g. Plain Text).


Release Notes:

- N/A
This commit is contained in:
Peter Tripp 2025-04-28 19:09:33 +00:00 committed by GitHub
parent 0afb980f7b
commit 0e477e7db9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -506,7 +506,7 @@ impl GitBlame {
} else {
// If we weren't triggered by a user, we just log errors in the background, instead of sending
// notifications.
log::error!("failed to get git blame data: {error:?}");
log::debug!("failed to get git blame data: {error:?}");
}
}),
})

View file

@ -1432,7 +1432,7 @@ impl LocalLspStore {
};
let Some(language_server) = language_server else {
log::warn!(
log::debug!(
"No language server found to format buffer '{:?}'. Skipping",
buffer_path_abs.as_path().to_string_lossy()
);