quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.85k stars 394 forks source link

How to disable log? #1322

Closed go-jar closed 2 years ago

go-jar commented 2 years ago

I don't want these log, and how to disable it?

[INFO] 2022-03-03T17:45:02.217 /home/jingpingyin/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.8.0/src/connection.rs:277 - drive; id=0
[INFO] 2022-03-03T17:45:02.263 /home/jingpingyin/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.8.0/src/connection.rs:277 - drive; id=0
[INFO] 2022-03-03T17:45:02.309 /home/jingpingyin/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.8.0/src/connection.rs:277 - drive; id=0
[INFO] 2022-03-03T17:45:02.367 /home/jingpingyin/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.8.0/src/connection.rs:277 - drive; id=0
[INFO] 2022-03-03T17:45:02.368 /home/jingpingyin/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.8.0/src/connection.rs:277 - drive; id=0
dzvon commented 2 years ago

RUST_LOG=quinn=off

go-jar commented 2 years ago

RUST_LOG=quinn=off

Thanks! But I don't know where to set it.

Ralith commented 2 years ago

quinn uses the tracing crate for logging, and tracing itself does not produce any output unless you have configured a subscriber somewhere downstream. That subscriber is where you would apply filtering; @dzvon is assuming you're using tracing-subscriber's fmt subscriber configured to read directives from the environment.

go-jar commented 2 years ago

quinn uses the tracing crate for logging, and tracing itself does not produce any output unless you have configured a subscriber somewhere downstream. That subscriber is where you would apply filtering; @dzvon is assuming you're using tracing-subscriber's fmt subscriber configured to read directives from the environment.

Thanks!