Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Always log panics (#2896)

Max Brunsfeldb2d735e573e8
diff --cc crates/zed/src/main.rs
index 6c8d3218505,22a22ab0cf7..1a1612e141b
--- a/crates/zed/src/main.rs
+++ b/crates/zed/src/main.rs
@@@ -488,14 -493,13 +488,14 @@@ fn init_panic_hook(app: &App, installat
.as_millis(),
backtrace,
installation_id: installation_id.clone(),
+ 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));