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