Skip to content

Commit d4f67bc

Browse files
committed
logging
1 parent 97baef1 commit d4f67bc

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

crates/pet-poetry/src/environment_locations.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ pub fn list_environments(
3434

3535
let workspace_dirs = workspace_dirs
3636
.iter()
37+
.inspect(|workspace_dir| {
38+
trace!(
39+
"Inspecting workspace directory for pyproject.toml: {:?}",
40+
workspace_dir
41+
)
42+
})
3743
.map(|workspace_dir| (workspace_dir, PyProjectToml::find(workspace_dir)))
3844
.filter_map(|(workspace_dir, pyproject_toml)| {
3945
pyproject_toml.map(|pyproject_toml| (workspace_dir, pyproject_toml))

crates/pet-poetry/src/pyproject_toml.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ impl PyProjectToml {
1818
PyProjectToml { name }
1919
}
2020
pub fn find(path: &Path) -> Option<Self> {
21+
trace!("Finding poetry file in {:?}", path);
2122
parse(&path.join("pyproject.toml"))
2223
}
2324
}
2425

2526
fn parse(file: &Path) -> Option<PyProjectToml> {
27+
trace!("Parsing poetry file: {:?}", file);
2628
let contents = fs::read_to_string(file).ok()?;
2729
parse_contents(&contents, file)
2830
}

0 commit comments

Comments
 (0)