sfackler / rust-log-panics

Apache License 2.0
52 stars 14 forks source link

Expose the panic hook as method #8

Open piegamesde opened 3 years ago

piegamesde commented 3 years ago

Honestly, I don't know why the Rust stdlib doesn't do this, because besaid method [exists]() and also can be obtained using take_hook. Nevertheless, it would be cool if this workaround wasn't necessary and I could simply call log_panics::hook(info) instead.

Motivation: I need to do some cleanup+shutdown in my panic hook.