Compare commits
2 commits
b861469319
...
5d14b50531
Author | SHA1 | Date | |
---|---|---|---|
5d14b50531 | |||
cfd4d41a73 |
2 changed files with 10 additions and 6 deletions
|
@ -45,10 +45,10 @@ pub(super) async fn format_status(
|
||||||
Ok(format!(
|
Ok(format!(
|
||||||
"{}{}",
|
"{}{}",
|
||||||
ancestor,
|
ancestor,
|
||||||
if !thread.is_empty() {
|
if thread.is_empty() {
|
||||||
format!("\n{}", thread)
|
|
||||||
} else {
|
|
||||||
String::default()
|
String::default()
|
||||||
|
} else {
|
||||||
|
format!("\n{}", thread)
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
10
src/main.rs
10
src/main.rs
|
@ -35,8 +35,8 @@ struct Config {
|
||||||
output_dir: Option<String>,
|
output_dir: Option<String>,
|
||||||
#[arg(required = true)]
|
#[arg(required = true)]
|
||||||
date: String,
|
date: String,
|
||||||
#[arg(short, long)]
|
#[arg(short, long, action = clap::ArgAction::Count)]
|
||||||
verbose: bool,
|
verbose: u8,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
|
@ -49,7 +49,11 @@ async fn main() -> Result<()> {
|
||||||
output_dir,
|
output_dir,
|
||||||
} = Config::parse();
|
} = 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::set_var("RUST_LOG", format!("{}={}", module_path!(), level));
|
||||||
env_logger::init();
|
env_logger::init();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue