diff --git a/Cargo.toml b/Cargo.toml index 6585514..508b4c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/main.rs b/src/main.rs index 5590c7e..b602569 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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()) }