diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2019-02-10 22:46:08 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2019-02-11 03:52:04 +0100 |
commit | 334e9e39549e84dd9a42c040a318bfc41ac84cba (patch) | |
tree | 21545e426318f42ddaf3dd3d1969faa192e1ac51 | |
parent | c98ec920a3cfd7bf9feec42032d3d90376dfadf2 (diff) |
Add debug output
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r-- | bin/domain/imag-habit/src/main.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bin/domain/imag-habit/src/main.rs b/bin/domain/imag-habit/src/main.rs index 0f637eaa..d667ff6a 100644 --- a/bin/domain/imag-habit/src/main.rs +++ b/bin/domain/imag-habit/src/main.rs @@ -304,6 +304,8 @@ fn today(rt: &Runtime, future: bool) { .count() != 0; debug!("Any today relevant = {}", any_today_relevant); + debug!("relevant = {:?}", relevant); + if !any_today_relevant { let n = rt .cli() @@ -367,8 +369,16 @@ fn today(rt: &Runtime, future: bool) { .next_instance_date() .map_err_trace_exit_unwrap() .map(|date| { - habit.instance_exists_for_date(&date) - .map_err_trace_exit_unwrap() + let instance_exists = habit + .instance_exists_for_date(&date) + .map_err_trace_exit_unwrap(); + + debug!("instance exists for {:?} for {:?} = {:?}", + habit.get_location().local_display_string(), + date, + instance_exists); + + instance_exists }) .unwrap_or(false) }) |