mozilla / neqo

Neqo, the Mozilla Firefox implementation of QUIC in Rust
https://firefox-source-docs.mozilla.org/networking/http/http3.html
Apache License 2.0
1.82k stars 123 forks source link

Replace `neqo_common::log` with `log` crate #1963

Open mxinden opened 1 month ago

mxinden commented 1 month ago

neqo* currently uses neqo_common::log for all things logging. It is a wrapper around the log crate.

What is the benefit of using neqo_common::log over using the log crate directly? From what I can tell:

Are the benefits worth a custom way of logging? Should a library instantiate a logger instead of the conventional instantiation by the calling binary?

Related, other Mozilla code using log: https://searchfox.org/mozilla-central/search?q=%5Elog+%3D&path=*Cargo.toml&case=true&regexp=true

larseggert commented 1 month ago

I'd be OK with removing this.

larseggert commented 1 month ago

There are some special things neqo_common::log allows, e.g., https://github.com/mozilla/neqo/blob/9f0a86db7f125d731cd10816e57728597d8437b5/neqo-crypto/src/agent.rs#L898-L902

Can we do this with log?