diff --git a/src/error.rs b/src/error.rs index 6c3ee0c..ef6f73d 100644 --- a/src/error.rs +++ b/src/error.rs @@ -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)?; diff --git a/src/main.rs b/src/main.rs index 9a76b27..506bee1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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()