diff --git a/rust/agama-server/src/web/service.rs b/rust/agama-server/src/web/service.rs index f8c064f09d..8565b9544a 100644 --- a/rust/agama-server/src/web/service.rs +++ b/rust/agama-server/src/web/service.rs @@ -59,13 +59,16 @@ impl MainServiceBuilder { )) .route("/ping", get(super::http::ping)) .route("/authenticate", post(super::http::authenticate)) - .layer(TraceLayer::new_for_http() - .on_request(|request: &Request, _span: &Span| { - tracing::info!("request: {} {}", request.method(), request.uri().path()) - }) - .on_response(|response: &Response, latency: Duration, _span: &Span| { - tracing::info!("response: {} {:?}", response.status(), latency) - }) + .layer( + TraceLayer::new_for_http() + .on_request(|request: &Request, _span: &Span| { + tracing::info!("request: {} {}", request.method(), request.uri().path()) + }) + .on_response( + |response: &Response, latency: Duration, _span: &Span| { + tracing::info!("response: {} {:?}", response.status(), latency) + }, + ), ) .layer(CompressionLayer::new().br(true)) .with_state(state)