minor: Tweak some verbose LSP logs

The info log within `process_request_response` duplicated the body of
the JSON message printed earlier by the transport which was confusing.

The error log in the completion handler was easy to hit during normal
use and is not actually an error - dropping is the graceful way to
handle changes occurring while completion requests are in flight.
This commit is contained in:
Michael Davis 2025-03-04 11:25:09 -05:00
parent 1d453785e5
commit ab56f9e26b
No known key found for this signature in database
2 changed files with 2 additions and 5 deletions

View file

@ -223,10 +223,7 @@ impl Transport {
language_server_name: &str,
) -> Result<()> {
let (id, result) = match output {
jsonrpc::Output::Success(jsonrpc::Success { id, result, .. }) => {
info!("{language_server_name} <- {}", result);
(id, Ok(result))
}
jsonrpc::Output::Success(jsonrpc::Success { id, result, .. }) => (id, Ok(result)),
jsonrpc::Output::Failure(jsonrpc::Failure { id, error, .. }) => {
error!("{language_server_name} <- {error}");
(id, Err(error.into()))

View file

@ -57,7 +57,7 @@ async fn replace_completions(
return;
};
if handle.is_canceled() {
log::error!("dropping outdated completion response");
log::info!("dropping outdated completion response");
return;
}