Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed Apr 11, 2024
1 parent b819396 commit 7f9f06c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions rust/agama-server/src/web/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ use axum::{
body::Body,
extract::Request,
middleware,
response::IntoResponse,
response::Response,
response::{IntoResponse, Response},
routing::{get, post},
Router,
};
use std::time::Duration;
use std::{
convert::Infallible,
path::{Path, PathBuf},
};
use std::time::Duration;
use tower::Service;
use tower_http::{compression::CompressionLayer, services::ServeDir, trace::TraceLayer};
use tracing::Span;
Expand Down Expand Up @@ -101,7 +100,7 @@ impl MainServiceBuilder {
TraceLayer::new_for_http()
.on_request(|request: &Request<Body>, _span: &Span| {
tracing::info!("request: {} {}", request.method(), request.uri().path())
})
})
.on_response(
|response: &Response<Body>, latency: Duration, _span: &Span| {
tracing::info!("response: {} {:?}", response.status(), latency)
Expand Down

0 comments on commit 7f9f06c

Please sign in to comment.