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

New fatal macro #1

Merged
merged 15 commits into from
Apr 24, 2019
Merged

New fatal macro #1

merged 15 commits into from
Apr 24, 2019

Conversation

dekellum
Copy link
Owner

Easy to implement. Somewhat harder to test. The idea for this came in rust-lang/log#317, when observing the use pattern of a error! followed by panic! with the same or similar message.

Consider that: https://github.com/sfackler/rust-log-panics could be a better general solution to avoiding the perceived redundancy, at the expense of per thread init which might not always be easy to arrange?

@dekellum dekellum added the WIP Work In Progress label Mar 29, 2019
@dekellum
Copy link
Owner Author

Regarding log_panics, I'm surprised to learn that std::panic::set_hook is a global resource, not a per-thread. That seems like something that will be viewed as a limiting for rust in the future, but I also don't find any set_hook calls in crates I am thus far concerned with: tokio, crossbeam, parking_lot, hyper.

@dekellum
Copy link
Owner Author

@dekellum dekellum merged commit eb7bff7 into master Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work In Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant