Add -v option to print out logs (>= info) (#164)

This commit is contained in:
Idan Katz
2019-06-05 11:44:28 +03:00
committed by Roey Darwish Dror
parent 680f9a6d19
commit 232c886be6
2 changed files with 17 additions and 1 deletions

View File

@@ -117,6 +117,10 @@ pub struct CommandLineArgs {
/// Do not perform upgrades for the given steps
#[structopt(long = "disable", raw(possible_values = "&Step::possible_values()"))]
disable: Vec<Step>,
/// Output logs
#[structopt(short = "v", long = "verbose")]
verbose: bool,
}
/// Represents the application configuration
@@ -189,4 +193,9 @@ impl Config {
pub fn no_retry(&self) -> bool {
self.opt.no_retry
}
/// Tell whether we should print log.
pub fn verbose(&self) -> bool {
self.opt.verbose
}
}