pub fn new_with_verbosity(verbosity: usize, color_config: &ColorConfig) -> Self {
        let level_override = match verbosity {
            0 => None,
            1 => Some(LevelFilter::INFO),
            2 => Some(LevelFilter::DEBUG),
            _ => Some(LevelFilter::TRACE),
        };

        let env_filter = |level: LevelFilter| {
            let filter = EnvFilter::builder()
                .with_default_directive(level.into())
                .with_env_var("TURBO_LOG_VERBOSITY")
                .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())
            } else {
                filter
            }
        };

        let stderr = fmt::layer()
            .with_writer(StdErrWrapper {})
            .event_format(TurboFormatter::new_with_ansi(
                !color_config.should_strip_ansi,
            ))
            .with_filter(env_filter(LevelFilter::WARN));

        // we set this layer to None to start with, effectively disabling it
        let (logrotate, daemon_update) = reload::Layer::new(Option::<DaemonLog>::None);
        let logrotate: DaemonLogFiltered = logrotate.with_filter(env_filter(LevelFilter::INFO));

        let (chrome, chrome_update) = reload::Layer::new(Option::<ChromeLog>::None);

        let registry = Registry::default()
            .with(stderr)
            .with(logrotate)
            .with(chrome);

        #[cfg(feature = "pprof")]
        let pprof_guard = pprof::ProfilerGuardBuilder::default()
            .frequency(1000)
            .blocklist(&["libc", "libgcc", "pthread", "vdso"])
            .build()
            .unwrap();

        registry.init();

        Self {
            daemon_update,
            daemon_guard: Mutex::new(None),
            chrome_update,
            chrome_guard: Mutex::new(None),
            #[cfg(feature = "pprof")]
            pprof_guard,
        }
    }
Sets up the tracing subscriber, with a default stderr layer using the
TurboFormatter.

## Logging behaviour:
- If stdout is a terminal, we use ansi colors. Otherwise, we do not.
- If the `TURBO_LOG_VERBOSITY` env var is set, it will be used to set
the verbosity level. Otherwise, the default is `WARN`. See the
documentation on the RUST_LOG env var for syntax.
- If the verbosity argument (usually determined by a flag) is provided,
it overrides the default global log level. This means it overrides the
`TURBO_LOG_VERBOSITY` global setting, but not per-module settings.

`TurboSubscriber` has optional loggers that can be enabled later:
- `set_daemon_logger` enables logging to a file, using the standard
formatter.
- `enable_chrome_tracing` enables logging to a file, using the chrome
tracing formatter.
crates/turborepo-lib/src/tracing.rs