Skip to content

Commit

Permalink
feat: introduce logger to csv exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
SkuldNorniern committed Mar 13, 2024
1 parent da9093d commit b55e2d0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/fluere_csv_exporter.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
use fluereflow::FluereRecord;
use log::{ debug, trace};
use std::fs::File;

pub fn fluere_exporter(records: Vec<FluereRecord>, file: File) {
let mut wtr = csv::Writer::from_writer(file);

// println!("Writing {} records", records.len());
// println!(" record: {:?}", records);
debug!("Writing {} records", records.len());
trace!(" record: {:?}", records);
wtr.write_record([
"source",
"destination",
Expand Down Expand Up @@ -68,4 +69,5 @@ pub fn fluere_exporter(records: Vec<FluereRecord>, file: File) {
])
.unwrap();
}
debug!("Wrote {} records", records.len());
}

0 comments on commit b55e2d0

Please sign in to comment.