Add debug and trace output
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
44896327e5
commit
b2fbf1e462
1 changed files with 9 additions and 5 deletions
|
@ -323,14 +323,18 @@ impl<'a, H> MutRef for MutRefWithHasher<'a, H>
|
||||||
let _ = Err(msg).context("Making ref out of entry")?;
|
let _ = Err(msg).context("Making ref out of entry")?;
|
||||||
}
|
}
|
||||||
|
|
||||||
debug!("Entry hashing...");
|
debug!("Entry hashing = {}", file_path.display());
|
||||||
let _ = H::hash(&file_path)
|
let _ = H::hash(&file_path)
|
||||||
.and_then(|hash| {
|
.and_then(|hash| {
|
||||||
// stripping the prefix of "path"
|
trace!("hash = {}", hash);
|
||||||
let relpath = path.as_ref()
|
|
||||||
.strip_prefix(get_basepath(collection_name.as_ref(), config)?)?;
|
|
||||||
trace!("Using relpath = {} to make header section", relpath.display());
|
|
||||||
|
|
||||||
|
// stripping the prefix of "path"
|
||||||
|
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)
|
make_header_section(hash, H::NAME, relpath, collection_name)
|
||||||
})
|
})
|
||||||
.and_then(|h| self.0.get_header_mut().insert("ref", h).map_err(Error::from))
|
.and_then(|h| self.0.get_header_mut().insert("ref", h).map_err(Error::from))
|
||||||
|
|
Loading…
Reference in a new issue