Skip to content

Commit

Permalink
chore: lower log level for noisy crates (#7439)
Browse files Browse the repository at this point in the history
### Description

Closes #7418 as [request warns on
all parse
errors](https://github.com/seanmonstar/reqwest/blob/master/src/async_impl/client.rs#L489).
As the comment points out, many systems have ancient certs that aren't
worth erroring on parse failures. If they needed those certs, then we'll
error when actually sending the HTTPS request.

Since I'm here, I'm also upping the underlying `hyper`/`h2` crate levels
to `warn` as they both produce a wild amount of debug logs that aren't
useful for us or our users.

### Testing Instructions

This cuts out a little over 100 lines from a short run:
```
[0 olszewski@chriss-mbp] /Users/olszewski/code/vercel/turborepo $ wc -l ~/Desktop/before.txt ~/Desktop/after.txt
     292 /Users/olszewski/Desktop/before.txt
     186 /Users/olszewski/Desktop/after.txt
     478 total
```
[before.txt](https://github.com/vercel/turbo/files/14350397/before.txt)
[after.txt](https://github.com/vercel/turbo/files/14350399/after.txt)


Closes TURBO-2402
  • Loading branch information
chris-olszewski committed Feb 20, 2024
1 parent 306f130 commit 7515ad6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/turborepo-lib/src/tracing.rs
Expand Up @@ -115,7 +115,10 @@ impl TurboSubscriber {
let filter = EnvFilter::builder()
.with_default_directive(LevelFilter::WARN.into())
.with_env_var("TURBO_LOG_VERBOSITY")
.from_env_lossy();
.from_env_lossy()
.add_directive("reqwest=error".parse().unwrap())
.add_directive("hyper=warn".parse().unwrap())
.add_directive("h2=warn".parse().unwrap());

if let Some(max_level) = level_override {
filter.add_directive(max_level.into())
Expand Down

0 comments on commit 7515ad6

Please sign in to comment.