From 15a248060464af12ee064cca74bc5605d67dcf5d Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 25 Oct 2015 21:51:13 +0100 Subject: [PATCH] Add information on what gets done --- src/module/bm/mod.rs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/module/bm/mod.rs b/src/module/bm/mod.rs index 418b6cff..66bf5c9d 100644 --- a/src/module/bm/mod.rs +++ b/src/module/bm/mod.rs @@ -50,6 +50,7 @@ impl Module for BMModule { fn add<'a>(rt: &Runtime, sub: &ArgMatches<'a, 'a>) -> ModuleResult { let url = sub.value_of("url").unwrap(); let tags = get_tags(rt, sub); + info!("Adding url '{}' with tags '{:?}'", url, tags.unwrap_or(vec!())); Ok(()) } @@ -58,6 +59,17 @@ fn list<'a>(rt: &Runtime, sub: &ArgMatches<'a, 'a>) -> ModuleResult { let tags = get_tags(rt, sub); let matcher = get_matcher(rt, sub); + match matcher { + Some(reg) => { + info!("Listing urls with matcher '{}' and with tags {:?}", + reg.as_str(), + tags.unwrap_or(vec!())); + } + None => { + info!("Listing urls with tags {:?}", tags.unwrap_or(vec!())); + } + } + Ok(()) } @@ -66,6 +78,24 @@ fn remove<'a>(rt: &Runtime, sub: &ArgMatches<'a, 'a>) -> ModuleResult { let matcher = get_matcher(rt, sub); let id = get_id(rt, sub); + match id { + Some(idstr) => { + info!("Removing urls with id '{}'", idstr); + } + None => { + match matcher { + Some(reg) => { + info!("Removing urls with matcher '{}' and with tags {:?}", + reg.as_str(), + tags.unwrap_or(vec!())); + } + None => { + info!("Listing urls with tags {:?}", tags.unwrap_or(vec!())); + } + } + } + } + Ok(()) }