mirror of
https://git.asonix.dog/asonix/relay.git
synced 2024-11-25 19:11:08 +00:00
Don't include SpanTrace in Error debug
This commit is contained in:
parent
3912f1203d
commit
8b6d97fd4a
2 changed files with 7 additions and 2 deletions
|
@ -9,12 +9,17 @@ use std::{convert::Infallible, fmt::Debug, io};
|
|||
use tracing::error;
|
||||
use tracing_error::SpanTrace;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct Error {
|
||||
context: SpanTrace,
|
||||
kind: ErrorKind,
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for Error {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
writeln!(f, "{:?}", self.kind)
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for Error {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
writeln!(f, "{}", self.kind)?;
|
||||
|
|
|
@ -37,7 +37,7 @@ fn init_subscriber(
|
|||
let env_filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info"));
|
||||
|
||||
let format_layer = tracing_subscriber::fmt::layer()
|
||||
.with_span_events(FmtSpan::NEW | FmtSpan::CLOSE)
|
||||
.with_span_events(FmtSpan::CLOSE)
|
||||
.pretty();
|
||||
|
||||
let subscriber = tracing_subscriber::Registry::default()
|
||||
|
|
Loading…
Reference in a new issue