summaryrefslogtreecommitdiffstats
path: root/bin/domain/imag-todo/src/lib.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-03-01 19:10:17 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-03-01 20:35:45 +0100
commit10a7049639136cdcce0fad2209e631a21d00b595 (patch)
treeb852f523157eedf9df54a6be055cf8c42072b781 /bin/domain/imag-todo/src/lib.rs
parentb48c45ec4ba26ed987e60ddd1b5e0c32f1225463 (diff)
downloadimag-10a7049639136cdcce0fad2209e631a21d00b595.tar.gz
imag-10a7049639136cdcce0fad2209e631a21d00b595.tar.xz
Diffstat (limited to 'bin/domain/imag-todo/src/lib.rs')
-rw-r--r--bin/domain/imag-todo/src/lib.rs15
1 files changed, 11 insertions, 4 deletions
diff --git a/bin/domain/imag-todo/src/lib.rs b/bin/domain/imag-todo/src/lib.rs
index cc17a1db..42f9baeb 100644
--- a/bin/domain/imag-todo/src/lib.rs
+++ b/bin/domain/imag-todo/src/lib.rs
@@ -254,6 +254,8 @@ fn list_todos(rt: &Runtime, matcher: &StatusMatcher, show_hidden: bool) -> Resul
{
use libimagentryview::error::Error as E;
+ trace!("Viewing entry: {}", entry.get_location());
+
if !entry.is_todo().map_err(E::from)? {
return Err(format_err!("Not a Todo: {}", entry.get_location())).map_err(E::from);
}
@@ -267,10 +269,12 @@ fn list_todos(rt: &Runtime, matcher: &StatusMatcher, show_hidden: bool) -> Resul
.unwrap_or("<empty description>");
if !self.details {
- writeln!(sink, "{uuid} - {status} : {first_line}",
+ let r = writeln!(sink, "{uuid} - {status} : {first_line}",
uuid = uuid,
status = status,
- first_line = first_line)
+ first_line = first_line);
+ trace!("Viewing entry result: {:?}", r);
+ r
} else {
let sched = util::get_dt_str(entry.get_scheduled(), "Not scheduled")?;
let hidden = util::get_dt_str(entry.get_hidden(), "Not hidden")?;
@@ -278,14 +282,17 @@ fn list_todos(rt: &Runtime, matcher: &StatusMatcher, show_hidden: bool) -> Resul
let priority = entry.get_priority().map_err(E::from)?.map(|p| p.as_str().to_string())
.unwrap_or_else(|| "No prio".to_string());
- writeln!(sink, "{uuid} - {status} - {sched} - {hidden} - {due} - {prio}: {first_line}",
+ let r = writeln!(sink, "{uuid} - {status} - {sched} - {hidden} - {due} - {prio}: {first_line}",
uuid = uuid,
status = status,
sched = sched,
hidden = hidden,
due = due,
prio = priority,
- first_line = first_line)
+ first_line = first_line);
+
+ trace!("Viewing entry result: {:?}", r);
+ r
}
.map_err(libimagentryview::error::Error::from)
}