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 4badba9 commit b819396
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 @@ -97,13 +97,16 @@ impl MainServiceBuilder {
.route("/login", get(login_from_query))
.route("/po.js", get(super::http::po))
.nest("/api", api_router)
.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 b819396

Please sign in to comment.