Skip to content

Commit

Permalink
refactor!: rename log feature to tracing-log
Browse files Browse the repository at this point in the history
Previously `quinn*` would provide the `log` feature to log events via `log` if
no `tracing` subscriber exists.

Later quinn-rs#1923 allowed `quinn-udp` to log via
`log` directly, making `tracing` an optional dependency. For that, it introduced
the `direct-log` feature, a workaround name in order to not introduce a breaking
change.

This commit cleans up the above, renaming the `log` feature to `tracing-log` and
the `direct-log` to `log`. This is a breaking change and thus `quinn-udp` is
bumped to `v0.6.0`.

See quinn-rs#1921 for the full history.
  • Loading branch information
mxinden committed Jul 22, 2024
1 parent ff91ffe commit 4175696
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions quinn-proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ workspace = ".."
all-features = true

[features]
default = ["rustls", "log"]
default = ["rustls", "tracing-log"]
rustls = ["dep:rustls", "ring"]
ring = ["dep:ring"]
# Enable rustls ring provider and direct ring usage
# Provides `ClientConfig::with_platform_verifier()` convenience method
platform-verifier = ["dep:rustls-platform-verifier"]
# Configure `tracing` to log events via `log` if no `tracing` subscriber exists.
log = ["tracing/log"]
tracing-log = ["tracing/log"]

[dependencies]
arbitrary = { workspace = true, optional = true }
Expand Down
8 changes: 4 additions & 4 deletions quinn-udp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quinn-udp"
version = "0.5.3"
version = "0.6.0"
edition = "2021"
rust-version = "1.66"
license = "MIT OR Apache-2.0"
Expand All @@ -14,10 +14,10 @@ workspace = ".."
all-features = true

[features]
default = ["tracing", "log"]
default = ["tracing", "tracing-log"]
# Configure `tracing` to log events via `log` if no `tracing` subscriber exists.
log = ["tracing/log"]
direct-log = ["dep:log"]
tracing-log = ["tracing/log"]
log = ["dep:log"]

[dependencies]
libc = "0.2.113"
Expand Down
6 changes: 3 additions & 3 deletions quinn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rust-version = "1.67"
all-features = true

[features]
default = ["log", "platform-verifier", "ring", "runtime-tokio", "rustls"]
default = ["tracing-log", "platform-verifier", "ring", "runtime-tokio", "rustls"]
# Records how long locks are held, and warns if they are held >= 1ms
lock_tracking = []
# Provides `ClientConfig::with_platform_verifier()` convenience method
Expand All @@ -28,7 +28,7 @@ runtime-async-std = ["async-io", "async-std"]
runtime-smol = ["async-io", "smol"]

# Configure `tracing` to log events via `log` if no `tracing` subscriber exists.
log = ["tracing/log", "proto/log", "udp/log"]
tracing-log = ["tracing/log", "proto/tracing-log", "udp/tracing-log"]

[dependencies]
async-io = { workspace = true, optional = true }
Expand All @@ -45,7 +45,7 @@ socket2 = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
tokio = { workspace = true }
udp = { package = "quinn-udp", path = "../quinn-udp", version = "0.5", default-features = false, features = ["tracing"] }
udp = { package = "quinn-udp", path = "../quinn-udp", version = "0.6", default-features = false, features = ["tracing"] }

[dev-dependencies]
anyhow = { workspace = true }
Expand Down

0 comments on commit 4175696

Please sign in to comment.