From 334e9e39549e84dd9a42c040a318bfc41ac84cba Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 10 Feb 2019 22:46:08 +0100 Subject: [PATCH] Add debug output Signed-off-by: Matthias Beyer --- bin/domain/imag-habit/src/main.rs | 14 ++++++++++++-- 1 file 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) })