diff --git a/lib/entry/libimagentryref/src/generators/mod.rs b/lib/entry/libimagentryref/src/generators/mod.rs index 427ebaaa..204ae081 100644 --- a/lib/entry/libimagentryref/src/generators/mod.rs +++ b/lib/entry/libimagentryref/src/generators/mod.rs @@ -91,6 +91,7 @@ macro_rules! make_unique_ref_path_generator { } fn unique_hash>(path: A) -> Result { + debug!("Making unique hash for path: {:?}", path.as_ref()); $impl(path) } @@ -135,7 +136,8 @@ macro_rules! make_unique_ref_path_generator { $collectionname } - fn unique_hash>(path: A) -> Result { + fn unique_hash>(path: A) -> ::std::result::Result { + debug!("Making unique hash for path: {:?}", path.as_ref()); $impl(path) } @@ -198,6 +200,7 @@ macro_rules! make_sha_mod { /// Function which can be used by a wrapping UniqueRefPathGenerator to hash only N bytes. pub fn hash_n_bytes>(path: A, n: usize) -> Result { + debug!("Opening '{}' for hashing", path.as_ref().display()); OpenOptions::new() .read(true) .write(false) @@ -233,8 +236,13 @@ macro_rules! make_sha_mod { make_sha_mod! { sha1, Sha1, |buffer: String| { let mut hasher = ::crypto::sha1::Sha1::new(); + + trace!("Hashing: '{:?}'", buffer); hasher.input_str(&buffer); - Ok(String::from(hasher.result_str())) + let res = hasher.result_str(); + trace!("Hash => '{:?}'", res); + + Ok(String::from(res)) } }