Skip to content

Commit ea6dd51

Browse files
authored
Enable tracing by default (#2460)
1 parent 12e8c62 commit ea6dd51

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

axum/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
- **added:** `Body` implements `From<()>` now ([#2411])
1111
- **change:** Update version of multer used internally for multipart ([#2433])
1212
- **change:** Update tokio-tungstenite to 0.21 ([#2435])
13+
- **added:** Enable `tracing` feature by default ([#2460])
1314
- **added:** Support graceful shutdown on `serve` ([#2398])
1415

1516
[#2411]: https://github.com/tokio-rs/axum/pull/2411
1617
[#2433]: https://github.com/tokio-rs/axum/pull/2433
1718
[#2435]: https://github.com/tokio-rs/axum/pull/2435
19+
[#2460]: https://github.com/tokio-rs/axum/pull/2460
1820
[#2398]: https://github.com/tokio-rs/axum/pull/2398
1921

2022
# 0.7.2 (03. December, 2023)

axum/Cargo.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@ readme = "README.md"
1212
repository = "https://github.com/tokio-rs/axum"
1313

1414
[features]
15-
default = ["form", "http1", "json", "matched-path", "original-uri", "query", "tokio", "tower-log"]
15+
default = [
16+
"form",
17+
"http1",
18+
"json",
19+
"matched-path",
20+
"original-uri",
21+
"query",
22+
"tokio",
23+
"tower-log",
24+
"tracing",
25+
]
1626
form = ["dep:serde_urlencoded"]
1727
http1 = ["dep:hyper", "hyper?/http1"]
1828
http2 = ["dep:hyper", "hyper?/http2"]

axum/src/docs/extract.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,9 +707,9 @@ async fn handler(
707707
# Logging rejections
708708

709709
All built-in extractors will log rejections for easier debugging. To see the
710-
logs, enable the `tracing` feature for axum and the `axum::rejection=trace`
711-
tracing target, for example with `RUST_LOG=info,axum::rejection=trace cargo
712-
run`.
710+
logs, enable the `tracing` feature for axum (enabled by default) and the
711+
`axum::rejection=trace` tracing target, for example with
712+
`RUST_LOG=info,axum::rejection=trace cargo run`.
713713

714714
[`body::Body`]: crate::body::Body
715715
[`Bytes`]: crate::body::Bytes

0 commit comments

Comments
 (0)