Expand description
A more lightweight alternative to color-eyre, which simply grants access to the span where an error happened, allowing them to be printed into standard logging facilityies.
To use, install the handler, after which you can get the span with ReportSpan::span
or immediately log a Result with emit or its method alias Emit::emit.
This may not work correctly with all subscriber, but it works fine with the standard tracing_subscriber::fmt.
If the tracing-error feature is enabled (default), the Display implementation will show a span trace.
Traits§
- Emit
- Extension trait for the
emitmethod. - Report
Span - Extension trait for the
spanmethod.
Functions§
- emit
- Sends a
tracing::error!event if an error happened. - install
- Installs the hook into Eyre. Required for this crate to function.