mirror of
https://github.com/supleed2/cch23-8bit.git
synced 2024-12-22 05:55:50 +00:00
Add http request logging
This commit is contained in:
parent
e07eb0dba4
commit
ee0e3042bb
|
@ -17,7 +17,7 @@ shuttle-runtime = "0.35.0"
|
|||
shuttle-shared-db = { version = "0.35.1", features = ["postgres"] }
|
||||
sqlx = { version = "0.7.3", features = ["postgres", "runtime-tokio-native-tls"] }
|
||||
tokio = "1.34.0"
|
||||
tower-http = { version = "0.5.0", features = ["fs"] }
|
||||
tower-http = { version = "0.5.0", features = ["fs","trace"] }
|
||||
tracing = "0.1.40"
|
||||
ulid = { version = "1.1.0", features = ["uuid", "serde"] }
|
||||
uuid = "1.6.1"
|
||||
|
|
|
@ -2,5 +2,8 @@ mod cal;
|
|||
|
||||
#[shuttle_runtime::main]
|
||||
async fn main(#[shuttle_shared_db::Postgres] pool: sqlx::PgPool) -> shuttle_axum::ShuttleAxum {
|
||||
Ok(axum::Router::new().nest("/", cal::router(pool)).into())
|
||||
Ok(axum::Router::new()
|
||||
.nest("/", cal::router(pool))
|
||||
.layer(tower_http::trace::TraceLayer::new_for_http())
|
||||
.into())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue