sfackler / rust-log-panics

Apache License 2.0
52 stars 14 forks source link

Allow customizing backtrace printing beyond the feature flag #11

Closed jrose-signal closed 1 year ago

jrose-signal commented 1 year ago

This adds a builder Config for customizing the panic hook, which currently only has one option, backtrace_mode. There are three modes:

The builder is implemented such that if symbol resolution is not requested, that part of the 'backtrace' crate can be eliminated as dead code if the client is compiled with LTO (thin or full).


Fixes #10. Tested with

as well as compiling signalapp/libsignal against this branch of log-panics and disabling symbol resolution.

sfackler commented 1 year ago

LGTM other than the one comment.