Add trace output
This commit is contained in:
parent
9f99783c6e
commit
b27b392f4b
2 changed files with 5 additions and 0 deletions
|
@ -96,6 +96,7 @@ impl FileAbstractionInstance for FSFileAbstractionInstance {
|
|||
};
|
||||
*self = FSFileAbstractionInstance::File(file, path);
|
||||
if let FSFileAbstractionInstance::File(ref mut f, _) = *self {
|
||||
trace!("Writing buffer...");
|
||||
return f.write_all(&buf).chain_err(|| SEK::FileNotWritten);
|
||||
}
|
||||
unreachable!();
|
||||
|
|
|
@ -177,6 +177,7 @@ impl StoreEntry {
|
|||
fn write_entry(&mut self, entry: &Entry) -> Result<()> {
|
||||
if self.is_borrowed() {
|
||||
assert_eq!(self.id, entry.location);
|
||||
trace!("Writing entry...");
|
||||
self.file
|
||||
.write_file_content(entry)
|
||||
.map(|_| ())
|
||||
|
@ -442,11 +443,13 @@ impl Store {
|
|||
|
||||
debug!("Writing Entry");
|
||||
se.write_entry(&entry.entry)?;
|
||||
trace!("Entry written");
|
||||
if modify_presence {
|
||||
debug!("Modifying presence of {} -> Present", entry.get_location());
|
||||
se.status = StoreEntryStatus::Present;
|
||||
}
|
||||
|
||||
trace!("Entry updated successfully");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -798,6 +801,7 @@ impl<'a> Drop for FileLockEntry<'a> {
|
|||
use libimagerror::trace::trace_error_dbg;
|
||||
trace!("Dropping: {:?} - from FileLockEntry::drop()", self.get_location());
|
||||
if let Err(e) = self.store._update(self, true) {
|
||||
trace!("Error happened in FileLockEntry::drop() while Store::update()ing");
|
||||
trace_error_dbg(&e);
|
||||
if_cfg_panic!("ERROR WHILE DROPPING: {:?}", e);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue