pub(crate) fn install_panic_hook()Expand description
Record every panic in agentmux-launcher.log, then run whatever hook was
installed before (the default one, which prints to stderr).
The launcher spawns dozens of tokio tasks and threads. A panic in a task
is caught by tokio and the task just ends; the launcher keeps running and
nothing, anywhere, says it happened. The launcher’s own stderr goes nowhere
useful, so even a panic that does end the process left no trace in this
log. With this hook either case leaves a line naming the thread and the
source location, which is what is needed to tell how often it happens
before deciding whether the launcher can afford panic = "abort".
Call once, first thing in main.