Skip to content

Commit 1ae71b9

Browse files
committed
feat: capture panics in logs
1 parent f7f997d commit 1ae71b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ fn main() -> anyhow::Result<()> {
7575

7676
tracing::debug!("Initialized Logger");
7777

78+
std::panic::set_hook(Box::new(|info| {
79+
tracing::error!("{info}");
80+
}));
81+
7882
if let Err(e) = run() {
7983
tracing::error!("{e}");
8084
std::process::exit(1);

0 commit comments

Comments
 (0)