daboross / fern

Simple, efficient logging for Rust
MIT License
848 stars 51 forks source link

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

Closed BlackDex closed 1 year ago

BlackDex commented 4 years ago

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.

daboross commented 4 years ago

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 commented 4 years ago

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 commented 1 year ago

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