summaryrefslogtreecommitdiffstats
path: root/libimagentrylink
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-09-05 18:51:35 +0200
committerMatthias Beyer <mail@beyermatthias.de>2016-09-05 18:51:35 +0200
commitc23a11060fb6d137696a350188ee118363aa4f09 (patch)
tree40ed0a5da5c5173dd21a8a63011fbd4bb286e251 /libimagentrylink
parent2956df81f1d0e9901afc633b4fb68e04fae0a8a1 (diff)
Add debug output
Diffstat (limited to 'libimagentrylink')
-rw-r--r--libimagentrylink/src/external.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/libimagentrylink/src/external.rs b/libimagentrylink/src/external.rs
index baea8759..1a000eba 100644
--- a/libimagentrylink/src/external.rs
+++ b/libimagentrylink/src/external.rs
@@ -50,7 +50,10 @@ impl<'a> Link<'a> {
.read("imag.content.url")
.ok()
.and_then(|opt| match opt {
- Some(Value::String(s)) => Url::parse(&s[..]).ok(),
+ Some(Value::String(s)) => {
+ debug!("Found url, parsing: {:?}", s);
+ Url::parse(&s[..]).ok()
+ },
_ => None
})
}
@@ -118,7 +121,12 @@ impl ExternalLinker for Entry {
.map(|id| {
debug!("Retrieving entry for id: '{:?}'", id);
match store.retrieve(id.clone()) {
- Ok(f) => get_external_link_from_file(&f),
+ Ok(f) => {
+ debug!("Store::retrieve({:?}) succeeded", id);
+ debug!("getting external link from file now");
+ get_external_link_from_file(&f)
+ .map_err(|e| { debug!("URL -> Err = {:?}", e); e })
+ },
Err(e) => {
debug!("Retrieving entry for id: '{:?}' failed", id);
Err(LE::new(LEK::StoreReadError, Some(Box::new(e))))