From 0f6af0f475bc80c65a5a7c47ccc0caf4d8390854 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Wed, 23 Apr 2025 09:31:25 -0700 Subject: [PATCH] server: more debug prints --- server/src/nm.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/server/src/nm.rs b/server/src/nm.rs index 5df24a5..e763f61 100644 --- a/server/src/nm.rs +++ b/server/src/nm.rs @@ -990,6 +990,7 @@ pub async fn label_unprocessed( // Only process the first file path is multiple files have the same id let path = files.iter().next().unwrap(); let file = File::open(&path)?; + info!("mmaping {path}"); let mmap = unsafe { MmapOptions::new().map(&file)? }; let m = parse_mail(&mmap)?; let (matched_rule, add_tags) = find_tags(&rules, &m.headers); @@ -1049,17 +1050,17 @@ pub async fn label_unprocessed( .push(id.clone()); } } - println!("Adding {} distinct labels", add_mutations.len()); + info!("Adding {} distinct labels", add_mutations.len()); for (tag, ids) in add_mutations.iter() { - println!(" {tag}: {}", ids.len()); + info!(" {tag}: {}", ids.len()); if !dryrun { let ids: Vec<_> = ids.iter().map(|s| s.as_str()).collect(); nm.tags_add(tag, &ids)?; } } - println!("Removing {} distinct labels", rm_mutations.len()); + info!("Removing {} distinct labels", rm_mutations.len()); for (tag, ids) in rm_mutations.iter() { - println!(" {tag}: {}", ids.len()); + info!(" {tag}: {}", ids.len()); if !dryrun { let ids: Vec<_> = ids.iter().map(|s| s.as_str()).collect(); nm.tags_remove(tag, &ids)?;