slightly improve logging

This commit is contained in:
slonkazoid 2024-03-13 21:55:48 +03:00
parent 3705d412b4
commit 4b3c723ce1
Signed by: slonk
SSH key fingerprint: SHA256:tbZfJX4IOvZ0LGWOWu5Ijo8jfMPi78TU7x1VoEeCIjM

View file

@ -247,13 +247,12 @@ async fn main() {
method = ?request.method(),
path = ?request.uri().path(),
matched_path,
some_other_field = tracing::field::Empty,
)
})
.on_response(|response: &Response<_>, duration: Duration, span: &Span| {
let _ = span.enter();
let status = response.status();
info!(?status, ?duration);
info!(?status, ?duration, "response");
}),
);