Do not send any LSP logs by default to collab clients (#37163)
Follow-up https://github.com/zed-industries/zed/pull/37083 Noisy RPC LSP logs were functioning this way already, but to keep Collab loaded even less, do not send any kind of logs to the client if the client has a corresponding log tab not opened. This change is pretty raw and does not fully cover scenarious with multiple clients: if one client has a log tab open and another opens tab with another kind of log, the 2nd kind of logs will be streamed only. Also, it should be possible to forward the host logs to the client on enabling — that is not done to keep the change smaller. Release Notes: - N/A
This commit is contained in:
@@ -67,7 +67,7 @@ impl HeadlessProject {
|
||||
settings::init(cx);
|
||||
language::init(cx);
|
||||
project::Project::init_settings(cx);
|
||||
log_store::init(false, cx);
|
||||
log_store::init(true, cx);
|
||||
}
|
||||
|
||||
pub fn new(
|
||||
@@ -546,7 +546,9 @@ impl HeadlessProject {
|
||||
.context("lsp logs store is missing")?;
|
||||
|
||||
lsp_logs.update(&mut cx, |lsp_logs, _| {
|
||||
// we do not support any other log toggling yet
|
||||
// RPC logs are very noisy and we need to toggle it on the headless server too.
|
||||
// The rest of the logs for the ssh project are very important to have toggled always,
|
||||
// to e.g. send language server error logs to the client before anything is toggled.
|
||||
if envelope.payload.enabled {
|
||||
lsp_logs.enable_rpc_trace_for_language_server(server_id);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user