switch to tracing for logging

This commit is contained in:
Evan Almloff committed 2023-09-06 17:47:33 -05:00
1 parent c8127e164b
commit c55c17cb81
50 files changed
+95 -78

No files matched your search

+6 -1
View File
@@ -1,4 +1,5 @@
use std::pin::Pin;
use tracing_futures::Instrument;
use http::{Request, Response};
@@ -45,7 +46,11 @@ where
> + Send,
>,
> {
let fut = self.call(req);
let fut = self.call(req).instrument(tracing::trace_span!(
"service",
"{}",
std::any::type_name::<S>()
));
Box::pin(async move { fut.await.map_err(|err| err.into()) })
}
}