Skip to main content

install_panic_hook

Function install_panic_hook 

Source
fn install_panic_hook(panic_hook: PanicHook, uses_sentry: bool, json_logs: bool)
Expand description

Installs a panic hook that writes the panic to standard error, as one JSON line with JSON logs, and sends it to Sentry when Sentry is enabled.

Logs are written by another thread, which doesn’t run again after a panic, so the panic is written to standard error directly.