You've already forked AstralRinth
forked from didirus/AstralRinth
* now utilizing tracing better * better tracing * fix mac vs pc oppositional env var issue * modified loading package * added droppable loadingbarid that sends completion message * loading bar * regressed bug on mac * fixed non-updated loading bar on playground * Loading bar improvements --------- Co-authored-by: Jai A <jaiagr+gpg@pm.me>
19 lines
483 B
Rust
19 lines
483 B
Rust
use tracing_error::ExtractSpanTrace;
|
|
|
|
pub fn display_tracing_error(err: &theseus::Error) {
|
|
match get_span_trace(err) {
|
|
Some(span_trace) => {
|
|
tracing::error!(error = %err, span_trace = %span_trace);
|
|
}
|
|
None => {
|
|
tracing::error!(error = %err);
|
|
}
|
|
}
|
|
}
|
|
|
|
pub fn get_span_trace<'a>(
|
|
error: &'a (dyn std::error::Error + 'static),
|
|
) -> Option<&'a tracing_error::SpanTrace> {
|
|
error.source().and_then(|e| e.span_trace())
|
|
}
|