5 stable releases

Uses old Rust 2015

2.1.0 Jul 16, 2022
2.0.0 Dec 25, 2017
1.2.0 Aug 5, 2017
1.1.0 Dec 10, 2016
1.0.0 Jul 20, 2016

#61 in Debugging

Download history 11009/week @ 2023-12-23 20193/week @ 2023-12-30 24903/week @ 2024-01-06 24665/week @ 2024-01-13 22098/week @ 2024-01-20 23530/week @ 2024-01-27 26138/week @ 2024-02-03 25769/week @ 2024-02-10 22059/week @ 2024-02-17 23906/week @ 2024-02-24 29058/week @ 2024-03-02 32252/week @ 2024-03-09 30961/week @ 2024-03-16 27590/week @ 2024-03-23 30625/week @ 2024-03-30 25460/week @ 2024-04-06

120,323 downloads per month
Used in 71 crates (40 directly)

MIT/Apache

10KB
98 lines

rust-log-panics

CircleCI

Documentation

A panic hook which logs panics rather than printing them.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

A crate which logs panics instead of writing to standard error.

The format used is identical to the standard library's.

Because logging with a backtrace requires additional dependencies, the with-backtrace feature must be enabled. You can add the following in your Cargo.toml:

log-panics = { version = "2", features = ["with-backtrace"]}

To use, call log_panics::init() somewhere early in execution, such as immediately after initializing log, or use the Config builder for more customization.

Dependencies

~46–620KB
~12K SLoC