elixir-mint / mint

Functional HTTP client for Elixir with support for HTTP/1 and HTTP/2 🌱
Apache License 2.0
1.37k stars 112 forks source link

Add debug logs to Mint.HTTP2 #390

Closed whatyouhide closed 1 year ago

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 67e6569946fc2ecf60ce2ba2bf0c588af37c2f35-PR-390


Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/mint/http.ex 0 1 0.0%
lib/mint/http2.ex 9 11 81.82%
lib/mint/unsafe_proxy.ex 0 2 0.0%
lib/mint/http1.ex 2 5 40.0%
<!-- Total: 12 20 60.0% -->
Totals Coverage Status
Change from base Build ca4e975214bfbb7627f6b52b3a5ea2a6b97964df: -0.4%
Covered Lines: 1225
Relevant Lines: 1419

💛 - Coveralls
ericmj commented 1 year ago

I think this should be an opt-in config. Enabling debug logging in an application can be very noisy if we log every received frame by default.

whatyouhide commented 1 year ago

I changed my mind about that after all the logger work in Erlang. Now it's so easy to filter out logs, for example, that I think it might be even easier to just log and have folks use logger filters to weed out messages they don't want?

ericmj commented 1 year ago

The logger filtering is opt out though right? So if you have a bunch of libraries logging you need to do a lot of work to only get your application logs.

whatyouhide commented 1 year ago

@ericmj yes, it's opt-out, which is why I was leaning on sticking mostly with debug logs.

What were you thinking as opt in? A logs: boolean() option when starting Mint connections?

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build a7df9b391ae3483db0309df0f82897716f2a3308-PR-390

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/mint/http.ex 0 1 0.0%
lib/mint/http2.ex 9 11 81.82%
lib/mint/unsafe_proxy.ex 0 2 0.0%
lib/mint/http1.ex 2 5 40.0%
<!-- Total: 12 20 60.0% -->
Totals Coverage Status
Change from base Build ca4e975214bfbb7627f6b52b3a5ea2a6b97964df: -0.4%
Covered Lines: 1225
Relevant Lines: 1419

💛 - Coveralls