[red-knot] Improve various tracing logs (#13015)

This commit is contained in:
Alex Waygood 2024-08-20 19:34:51 +01:00 committed by GitHub
parent 0bd258a370
commit 37a60460ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 62 additions and 35 deletions

View file

@ -41,7 +41,7 @@ pub(crate) fn resolve_module_query<'db>(
let module = Module::new(name.clone(), kind, search_path, module_file);
tracing::debug!(
tracing::trace!(
"Resolved module '{name}' to '{path}'.",
path = module_file.path(db)
);
@ -172,11 +172,11 @@ impl SearchPaths {
static_paths.push(search_path);
}
tracing::debug!("Adding static search path '{src_root}'");
tracing::debug!("Adding first-party search path '{src_root}'");
static_paths.push(SearchPath::first_party(system, src_root)?);
static_paths.push(if let Some(custom_typeshed) = custom_typeshed {
tracing::debug!("Adding static custom-sdtlib search-path '{custom_typeshed}'");
tracing::debug!("Adding custom-stdlib search path '{custom_typeshed}'");
let search_path = SearchPath::custom_stdlib(db, custom_typeshed)?;
files.try_add_root(
@ -192,7 +192,7 @@ impl SearchPaths {
let mut site_packages: Vec<_> = Vec::with_capacity(site_packages_paths.len());
for path in site_packages_paths {
tracing::debug!("Adding site-package path '{path}'");
tracing::debug!("Adding site-packages search path '{path}'");
let search_path = SearchPath::site_packages(system, path)?;
files.try_add_root(
db.upcast(),