Enable tracing by default (#2460)

This commit is contained in:
David Pedersen 2023-12-29 13:44:20 +01:00 committed by GitHub
parent 12e8c6219d
commit ea6dd51e98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 4 deletions

View file

@ -10,11 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **added:** `Body` implements `From<()>` now ([#2411]) - **added:** `Body` implements `From<()>` now ([#2411])
- **change:** Update version of multer used internally for multipart ([#2433]) - **change:** Update version of multer used internally for multipart ([#2433])
- **change:** Update tokio-tungstenite to 0.21 ([#2435]) - **change:** Update tokio-tungstenite to 0.21 ([#2435])
- **added:** Enable `tracing` feature by default ([#2460])
- **added:** Support graceful shutdown on `serve` ([#2398]) - **added:** Support graceful shutdown on `serve` ([#2398])
[#2411]: https://github.com/tokio-rs/axum/pull/2411 [#2411]: https://github.com/tokio-rs/axum/pull/2411
[#2433]: https://github.com/tokio-rs/axum/pull/2433 [#2433]: https://github.com/tokio-rs/axum/pull/2433
[#2435]: https://github.com/tokio-rs/axum/pull/2435 [#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 [#2398]: https://github.com/tokio-rs/axum/pull/2398
# 0.7.2 (03. December, 2023) # 0.7.2 (03. December, 2023)

View file

@ -12,7 +12,17 @@ readme = "README.md"
repository = "https://github.com/tokio-rs/axum" repository = "https://github.com/tokio-rs/axum"
[features] [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"] form = ["dep:serde_urlencoded"]
http1 = ["dep:hyper", "hyper?/http1"] http1 = ["dep:hyper", "hyper?/http1"]
http2 = ["dep:hyper", "hyper?/http2"] http2 = ["dep:hyper", "hyper?/http2"]

View file

@ -707,9 +707,9 @@ async fn handler(
# Logging rejections # Logging rejections
All built-in extractors will log rejections for easier debugging. To see the 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` logs, enable the `tracing` feature for axum (enabled by default) and the
tracing target, for example with `RUST_LOG=info,axum::rejection=trace cargo `axum::rejection=trace` tracing target, for example with
run`. `RUST_LOG=info,axum::rejection=trace cargo run`.
[`body::Body`]: crate::body::Body [`body::Body`]: crate::body::Body
[`Bytes`]: crate::body::Bytes [`Bytes`]: crate::body::Bytes