summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-02-20 23:14:43 +0100
committerMatthias Beyer <mail@beyermatthias.de>2019-02-20 23:14:43 +0100
commitb2fbf1e4629fd05b37ac5636379efb709b060a1e (patch)
tree311f7290c3a1ba0abbeb9235d23ad6c0d943aa9f
parent44896327e567860bc1e924024f4a4a0403556322 (diff)
downloadimag-b2fbf1e4629fd05b37ac5636379efb709b060a1e.zip
imag-b2fbf1e4629fd05b37ac5636379efb709b060a1e.tar.gz
Add debug and trace output
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--lib/entry/libimagentryref/src/reference.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/entry/libimagentryref/src/reference.rs b/lib/entry/libimagentryref/src/reference.rs
index e3ea91e..68dd238 100644
--- a/lib/entry/libimagentryref/src/reference.rs
+++ b/lib/entry/libimagentryref/src/reference.rs
@@ -323,14 +323,18 @@ impl<'a, H> MutRef for MutRefWithHasher<'a, H>
let _ = Err(msg).context("Making ref out of entry")?;
}
- debug!("Entry hashing...");
+ debug!("Entry hashing = {}", file_path.display());
let _ = H::hash(&file_path)
.and_then(|hash| {
+ trace!("hash = {}", hash);
+
// stripping the prefix of "path"
- let relpath = path.as_ref()
- .strip_prefix(get_basepath(collection_name.as_ref(), config)?)?;
- trace!("Using relpath = {} to make header section", relpath.display());
+ let prefix = get_basepath(collection_name.as_ref(), config)?;
+ trace!("Stripping = {}", prefix.display());
+ let relpath = path.as_ref().strip_prefix(prefix)?;
+
+ trace!("Using relpath = {} to make header section", relpath.display());
make_header_section(hash, H::NAME, relpath, collection_name)
})
.and_then(|h| self.0.get_header_mut().insert("ref", h).map_err(Error::from))