Compare commits

...

2 commits

Author SHA1 Message Date
Thomas Gideon 5d14b50531 Make verbose work more like expected 2023-07-16 09:16:18 -04:00
Thomas Gideon cfd4d41a73 Adjust for style 2023-07-16 09:15:46 -04:00
2 changed files with 10 additions and 6 deletions

View file

@ -45,10 +45,10 @@ pub(super) async fn format_status(
Ok(format!(
"{}{}",
ancestor,
if !thread.is_empty() {
format!("\n{}", thread)
} else {
if thread.is_empty() {
String::default()
} else {
format!("\n{}", thread)
}
))
}

View file

@ -35,8 +35,8 @@ struct Config {
output_dir: Option<String>,
#[arg(required = true)]
date: String,
#[arg(short, long)]
verbose: bool,
#[arg(short, long, action = clap::ArgAction::Count)]
verbose: u8,
}
#[tokio::main]
@ -49,7 +49,11 @@ async fn main() -> Result<()> {
output_dir,
} = Config::parse();
let level = if verbose { "debug" } else { "off" };
let level = match verbose {
0 => "off",
1 => "debug",
_ => "trace",
};
env::set_var("RUST_LOG", format!("{}={}", module_path!(), level));
env_logger::init();