diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs index 6c8d3218505b729a860e06b2a8be220c9f70f25e..1a1612e141be29635278cb09f69ab4e6a2b39d07 100644 --- a/crates/zed/src/main.rs +++ b/crates/zed/src/main.rs @@ -491,11 +491,11 @@ fn init_panic_hook(app: &App, installation_id: Option, session_id: Strin session_id: session_id.clone(), }; - if is_pty { - if let Some(panic_data_json) = serde_json::to_string_pretty(&panic_data).log_err() { - eprintln!("{}", panic_data_json); - } - } else { + if let Some(panic_data_json) = serde_json::to_string_pretty(&panic_data).log_err() { + log::error!("{}", panic_data_json); + } + + if !is_pty { if let Some(panic_data_json) = serde_json::to_string(&panic_data).log_err() { let timestamp = chrono::Utc::now().format("%Y_%m_%d %H_%M_%S").to_string(); let panic_file_path = paths::LOGS_DIR.join(format!("zed-{}.panic", timestamp));