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

Catch panics and log them instead of only on stderr #52

Closed
BlackDex opened this issue Feb 25, 2020 · 3 comments
Closed

Catch panics and log them instead of only on stderr #52

BlackDex opened this issue Feb 25, 2020 · 3 comments

Comments

@BlackDex
Copy link

BlackDex commented Feb 25, 2020

Hello,

It would be nice to also log panics if possible.
Now it seems the panics are only visible on the stderr of the application.
I found something which kinda does this, https://github.com/sfackler/rust-log-panics but if it could be integrated into fern that would be great.

@BlackDex BlackDex changed the title Catch panics and log them instead of only on stdout Catch panics and log them instead of only on stderr Feb 25, 2020
@daboross
Copy link
Owner

daboross commented Mar 9, 2020

I think this is the kind of thing which is best done as a separate integration - it's kind of more on the "consumer" side of the log crate than the "backend" side. I'll leave this open for potential future integration, but as a low priority as it is currently possible, and pretty easy (just log_panics::init()).

@BlackDex
Copy link
Author

Yea, i have it integrated now, which is working great.
And since it still uses the default logging, the backtrace now also gets logged to file/syslog/stdout.

@BlackDex
Copy link
Author

Let's close this. It's been solved for a long time already.
Thx

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