Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route logs via log crate by default when tracing isn't used #1473

Merged
merged 1 commit into from
Dec 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion quinn-proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ all-features = true
maintenance = { status = "experimental" }

[features]
default = ["tls-rustls"]
default = ["tls-rustls", "log"]
tls-rustls = ["rustls", "webpki", "ring"]
# Provides `ClientConfig::with_native_roots()` convenience method
native-certs = ["rustls-native-certs"]
# Write logs via the `log` crate when no `tracing` subscriber exists
log = ["tracing/log"]

[dependencies]
arbitrary = { version = "1.0.1", features = ["derive"], optional = true }
Expand Down
5 changes: 5 additions & 0 deletions quinn-udp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ edition = "2018"
[package.metadata.docs.rs]
all-features = true

[features]
default = ["log"]
# Write logs via the `log` crate when no `tracing` subscriber exists
log = ["tracing/log"]

[badges]
maintenance = { status = "experimental" }

Expand Down
6 changes: 4 additions & 2 deletions quinn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rust-version = "1.59"
all-features = true

[features]
default = ["native-certs", "tls-rustls", "runtime-tokio"]
default = ["native-certs", "tls-rustls", "runtime-tokio", "log"]
# Records how long locks are held, and warns if they are held >= 1ms
lock_tracking = []
# Provides `ClientConfig::with_native_roots()` convenience method
Expand All @@ -25,6 +25,8 @@ tls-rustls = ["rustls", "webpki", "proto/tls-rustls", "ring"]
ring = ["proto/ring"]
runtime-tokio = ["tokio/time", "tokio/rt", "tokio/net"]
runtime-async-std = ["async-io", "async-std"]
# Write logs via the `log` crate when no `tracing` subscriber exists
log = ["tracing/log", "proto/log", "udp/log"]

[badges]
codecov = { repository = "djc/quinn" }
Expand All @@ -43,7 +45,7 @@ rustls = { version = "0.20.3", default-features = false, features = ["quic"], op
thiserror = "1.0.21"
tracing = "0.1.10"
tokio = { version = "1.13.0", features = ["sync"] }
udp = { package = "quinn-udp", path = "../quinn-udp", version = "0.3" }
udp = { package = "quinn-udp", path = "../quinn-udp", version = "0.3", default-features = false }
webpki = { version = "0.22", default-features = false, optional = true }

[dev-dependencies]
Expand Down