Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed Apr 11, 2024
1 parent c700129 commit 961788b
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions rust/agama-server/src/web/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<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)
})
.layer(
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)
},
),
)
.layer(CompressionLayer::new().br(true))
.with_state(state)
Expand Down

0 comments on commit 961788b

Please sign in to comment.