diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md index 61bc8d8a9b..91aa945369 100644 --- a/axum/CHANGELOG.md +++ b/axum/CHANGELOG.md @@ -10,11 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **added:** `Body` implements `From<()>` now ([#2411]) - **change:** Update version of multer used internally for multipart ([#2433]) - **change:** Update tokio-tungstenite to 0.21 ([#2435]) +- **added:** Enable `tracing` feature by default ([#2460]) - **added:** Support graceful shutdown on `serve` ([#2398]) [#2411]: https://github.com/tokio-rs/axum/pull/2411 [#2433]: https://github.com/tokio-rs/axum/pull/2433 [#2435]: https://github.com/tokio-rs/axum/pull/2435 +[#2460]: https://github.com/tokio-rs/axum/pull/2460 [#2398]: https://github.com/tokio-rs/axum/pull/2398 # 0.7.2 (03. December, 2023) diff --git a/axum/Cargo.toml b/axum/Cargo.toml index 2e341db924..6451cbff9f 100644 --- a/axum/Cargo.toml +++ b/axum/Cargo.toml @@ -12,7 +12,17 @@ readme = "README.md" repository = "https://github.com/tokio-rs/axum" [features] -default = ["form", "http1", "json", "matched-path", "original-uri", "query", "tokio", "tower-log"] +default = [ + "form", + "http1", + "json", + "matched-path", + "original-uri", + "query", + "tokio", + "tower-log", + "tracing", +] form = ["dep:serde_urlencoded"] http1 = ["dep:hyper", "hyper?/http1"] http2 = ["dep:hyper", "hyper?/http2"] diff --git a/axum/src/docs/extract.md b/axum/src/docs/extract.md index 384b233dbf..13d27171d6 100644 --- a/axum/src/docs/extract.md +++ b/axum/src/docs/extract.md @@ -707,9 +707,9 @@ async fn handler( # Logging rejections All built-in extractors will log rejections for easier debugging. To see the -logs, enable the `tracing` feature for axum and the `axum::rejection=trace` -tracing target, for example with `RUST_LOG=info,axum::rejection=trace cargo -run`. +logs, enable the `tracing` feature for axum (enabled by default) and the +`axum::rejection=trace` tracing target, for example with +`RUST_LOG=info,axum::rejection=trace cargo run`. [`body::Body`]: crate::body::Body [`Bytes`]: crate::body::Bytes