From 9c467d046258fbad94227a1eaa5506c6103b5afc Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 27 Apr 2019 01:33:04 +0200 Subject: [PATCH] Add debug output Signed-off-by: Matthias Beyer --- bin/domain/imag-contact/src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/domain/imag-contact/src/main.rs b/bin/domain/imag-contact/src/main.rs index bc950fa1..bd071800 100644 --- a/bin/domain/imag-contact/src/main.rs +++ b/bin/domain/imag-contact/src/main.rs @@ -116,6 +116,7 @@ fn main() { fn list(rt: &Runtime) { let scmd = rt.cli().subcommand_matches("list").unwrap(); let list_format = get_contact_print_format("contact.list_format", rt, &scmd); + debug!("List format: {:?}", list_format); let iterator = rt .store() @@ -134,6 +135,7 @@ fn list(rt: &Runtime) { .enumerate(); if scmd.is_present("json") { + debug!("Listing as JSON"); let v : Vec = iterator.map(|tpl| tpl.1).collect(); match ::serde_json::to_string(&v) { @@ -144,6 +146,7 @@ fn list(rt: &Runtime) { } } } else { + debug!("Not listing as JSON"); let output = rt.stdout(); let mut output = output.lock(); iterator