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:
SteveLauC
2025-11-25 08:56:29 +08:00
committed by GitHub
parent 8ac0065234
commit f83b1ba2a7
2 changed files with 5 additions and 0 deletions

View File

@@ -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

View File

@@ -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);
}));
}