summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/source_unit.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/source_unit.rs b/src/source_unit.rs
index 69eb436..243b0de 100644
--- a/src/source_unit.rs
+++ b/src/source_unit.rs
@@ -1,5 +1,6 @@
use crate::*;
+use log::info;
use vagabond::*;
@@ -11,6 +12,7 @@ pub fn gather_from_path_variable(variable: &str, extension: Option<&str>, parse:
let mut source_units = Vec::new();
if let Ok(string) = std::env::var(variable) {
for path in string.split(":").map(PathBuf::from) {
+ info!("Found path {path:?} in environment variable {variable:?}");
source_units.extend(gather_from_path(&path, extension, parse));
}
};
@@ -23,12 +25,15 @@ pub fn gather_from_path(path: &Path, extension: Option<&str>, parse: ParseFn) ->
if let Ok(entry) = Entry::from_path(path) {
if EntryType::File == entry.entry_type {
if let Ok(unit) = SourceUnit::from_path(&entry.path, extension, parse) {
+ info!("Found source file at {path:?}");
source_units.push(unit);
}
} else if EntryType::Directory == entry.entry_type {
+ info!("Traversing directory {path:?} for source files");
if let Ok(entries) = traverse_directory(entry.path) {
for entry in entries {
if let Ok(unit) = SourceUnit::from_path(&entry.path, extension, parse) {
+ info!("Found source file at {path:?}");
source_units.push(unit);
}
}