Skip to content

Commit

Permalink
Give time to flush log before aborting
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- committed Dec 12, 2023
1 parent 97708ae commit 78e970e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/ark/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,10 @@ fn main() {
} else {
log::error!("Panic! {loc} No contextual information.");
}

// Give some time to flush log
log::logger().flush();
std::thread::sleep(std::time::Duration::from_millis(250));

old_hook(panic_info);
std::process::abort();
Expand Down

0 comments on commit 78e970e

Please sign in to comment.