daboross/fern

Catch panics and log them instead of only on stderr

BlackDex opened this issue · 3 comments

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.

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()).

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.

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