Expand description
this is a fork of log-panic, we are just keeping the writing to standard error functionality. Without it, when rust integration test failed, you can’t see any failure reason printed on the terminal.
A crate which logs panics as erro using log
crate as well as 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-print-panics = { version = "2", features = ["with-backtrace"]}
To use, call log_print_panics::init()
somewhere early in execution,
such as immediately after initializing log
, or use the Config
builder for more customization.
Structs§
- Config
- Configures the panic hook, ending with initialization.
Enums§
- Backtrace
Mode with-backtrace
- Determines how backtraces will be displayed.
Functions§
- init
- Initializes the panic hook with the default settings.