keepsimple1 / mdns-sd

Rust library for mDNS based Service Discovery
Apache License 2.0
96 stars 37 forks source link

Too verbose logging, even when logging is not enabled #197

Closed acfsmith closed 4 months ago

acfsmith commented 5 months ago

First of all, thanks for the great library! I have tried a lot of DNS resolver libraries for Rust and this one works best for me.

Only problem is excessive logging. I use it without logging enabled: mdns-sd = { version = "0.10.5", features = ["async"] }. But still I have tons of debug messages in the logs.

keepsimple1 commented 5 months ago

Thanks!

Only problem is excessive logging. I use it without logging enabled: mdns-sd = { version = "0.10.5", features = ["async"] }. But still I have tons of debug messages in the logs.

You would need to add default-features = false (as the default includes both logging and async), like this:

mdns-sd = { version = "0.10.5", default-features = false, features = ["async"] }

(btw, looks like your calling code enabled DEBUG or INFO level? otherwise there are not much logs for WARN or ERROR level)

keepsimple1 commented 5 months ago

I think I answered your question. Please feel free to re-open this issue if you have more questions.

acfsmith commented 4 months ago

Sorry for the long answer. If default-features = false, the project won't compile because it still tries to use logs.

keepsimple1 commented 4 months ago

Sorry for the long answer. If default-features = false, the project won't compile because it still tries to use logs.

You are right, good catch! I created a PR #212 to fix this. Thanks a lot!

keepsimple1 commented 4 months ago

I've merged the fix. Let me know if it works for you.

keepsimple1 commented 4 months ago

If any problems, please let me know. Thanks!