Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

double panic if log::error! panics #16

Open
danielnorberg opened this issue Jun 7, 2024 · 3 comments
Open

double panic if log::error! panics #16

danielnorberg opened this issue Jun 7, 2024 · 3 comments

Comments

@danielnorberg
Copy link

Thank you for this library!

We use the rust tracing crate and ran into an issue where the panic hook itself panics on invoking log::error! when tracing is in a broken state.

First a tracing macro would panic, causing the panic hook to get invoked and then the panic hook panicked, yielding:

thread panicked while processing panic. aborting.

Could it make sense to fall back to e.g. eprintln! if log::error! panics?

@sfackler
Copy link
Owner

sfackler commented Jun 7, 2024

How would that be implemented?

@danielnorberg
Copy link
Author

Not sure, is it possible to catch a panic in the panic hook or does that second panic cause an immediate abort?

@sfackler
Copy link
Owner

sfackler commented Jun 7, 2024

It is an immediate abort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants