Add debugging logs to walk.rs and file scanning in scan.rs

- Added `#[derive(Debug)]` to `Batcher` for easier debugging.
- Included `tracing::debug` logging for file scanning in `walk.rs`.
- Moved `Indexer` initialization in `scan.rs` to align with indexing logic.
- Improved traceability by logging file paths during scanning in `scan.rs`.
This commit is contained in:
elipeter 2025-06-17 17:52:22 +02:00
parent 6b230617df
commit a2fc38f2c4
2 changed files with 6 additions and 3 deletions

View file

@ -8,6 +8,7 @@ const BATCH_SIZE: usize = 5;
type Batch = Vec<PathBuf>;
#[derive(Debug)]
struct Batcher {
tx: crossbeam_channel::Sender<Batch>,
batch: Batch,
@ -82,6 +83,7 @@ pub fn spawn_senders(
match entry {
Ok(e) if e.file_type().is_some_and(|ft| ft.is_file()) => {
b.push(e.into_path());
tracing::debug!("scanning file: {:?}", b);
if batch.len() == BATCH_SIZE {
let _ = tx.send(std::mem::take(&mut batch));
}