st_ino: u64,
}
-/// TODO: make a builder for the create_archive call for fewer parameters and add a method to add a
-/// logger which does not write to stderr.
-struct Logger;
-
-impl std::io::Write for Logger {
- fn write(&mut self, data: &[u8]) -> io::Result<usize> {
- std::io::stderr().write(data)
- }
-
- fn flush(&mut self) -> io::Result<()> {
- std::io::stderr().flush()
- }
-}
-
/// And the error case.
struct ErrorReporter;
device_set: Option<HashSet<u64>>,
hardlinks: HashMap<HardLinkInfo, (PathBuf, LinkOffset)>,
errors: ErrorReporter,
- logger: Logger,
file_copy_buffer: Vec<u8>,
}
device_set,
hardlinks: HashMap::new(),
errors: ErrorReporter,
- logger: Logger,
file_copy_buffer: vec::undefined(4 * 1024 * 1024),
};
}
let result = if skip_contents {
- writeln!(self.logger, "skipping mount point: {:?}", self.path)?;
+ log::info!("skipping mount point: {:?}", self.path);
Ok(())
} else {
self.archive_dir_contents(&mut encoder, dir, false).await