mirror of
https://github.com/infinilabs/coco-app.git
synced 2026-02-24 04:01:27 +01:00
chore: write panic message to stdout in panic hook (#989)
This commit updates the panic hook implementation to log the panic message to stdout as well, which would make debugging easier. It is hightly possible that a panic may get ignored by us when we run Coco app in the dev mode (since the hook only writes msg to the panic log file).
This commit is contained in:
@@ -20,6 +20,8 @@ Information about release notes of Coco App is provided here.
|
||||
|
||||
### ✈️ Improvements
|
||||
|
||||
- chore: write panic message to stdout in panic hook #989
|
||||
|
||||
## 0.9.0 (2025-11-19)
|
||||
|
||||
### ❌ Breaking changes
|
||||
|
||||
@@ -69,6 +69,9 @@ fn setup_panic_hook() {
|
||||
eprintln!("Panic hook error: Failed to open panic log file: {}", e);
|
||||
}
|
||||
}
|
||||
|
||||
// Write to stdout, with a new-line char since stdout is line-buffered.
|
||||
println!("{}\n", panic_log);
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user