From 15fca91cbc292c8fd982b67ca340ff3dc60a8795 Mon Sep 17 00:00:00 2001 From: Mehul Kar Date: Thu, 1 Aug 2024 11:28:39 -0500 Subject: [PATCH] chore: improve -vv logging --- crates/turborepo-lib/src/run/scope/change_detector.rs | 10 +++++++++- crates/turborepo-repository/src/package_json.rs | 2 +- crates/turborepo-telemetry/src/config.rs | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/crates/turborepo-lib/src/run/scope/change_detector.rs b/crates/turborepo-lib/src/run/scope/change_detector.rs index 2bd602822bd36..ee3924dd0fb37 100644 --- a/crates/turborepo-lib/src/run/scope/change_detector.rs +++ b/crates/turborepo-lib/src/run/scope/change_detector.rs @@ -95,7 +95,15 @@ impl<'a> GitChangeDetector for ScopeChangeDetector<'a> { } let lockfile_contents = self.get_lockfile_contents(from_ref, &changed_files); - debug!("changed_files: {changed_files:?}"); + + debug!( + "changed files: {:?}", + &changed_files + .iter() + .map(|x| x.to_string()) + .collect::>() + ); + match self .change_mapper .changed_packages(changed_files, lockfile_contents)? diff --git a/crates/turborepo-repository/src/package_json.rs b/crates/turborepo-repository/src/package_json.rs index 2618e7b1c1caa..d8552e8a33dd8 100644 --- a/crates/turborepo-repository/src/package_json.rs +++ b/crates/turborepo-repository/src/package_json.rs @@ -159,7 +159,7 @@ impl From for PnpmConfig { impl PackageJson { pub fn load(path: &AbsoluteSystemPath) -> Result { - tracing::debug!("loading package.json from {}", path); + tracing::trace!("loading package.json from {}", path); let contents = path.read_to_string()?; Self::load_from_str(&contents, path.as_str()) } diff --git a/crates/turborepo-telemetry/src/config.rs b/crates/turborepo-telemetry/src/config.rs index 0c3f68f42a034..ef02c0f70bc06 100644 --- a/crates/turborepo-telemetry/src/config.rs +++ b/crates/turborepo-telemetry/src/config.rs @@ -13,7 +13,7 @@ use chrono::{DateTime, Utc}; pub use config::{Config, ConfigError, File, FileFormat}; use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha256}; -use tracing::{debug, error}; +use tracing::{error, trace}; use turbopath::{AbsoluteSystemPath, AbsoluteSystemPathBuf}; use turborepo_dirs::config_dir; use turborepo_ui::{color, BOLD, GREY, UI, UNDERLINE}; @@ -67,7 +67,7 @@ impl TelemetryConfig { } pub fn new(config_path: AbsoluteSystemPathBuf) -> Result { - debug!("Telemetry config path: {}", config_path); + trace!("Telemetry config path: {}", config_path); if !config_path.exists() { write_new_config(&config_path)?; }