1
0
mirror of https://github.com/containers/youki synced 2024-09-20 10:54:22 +02:00

Override log opt when specified more than once (#1847)

* Override log opt when specified more than once

Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>

* Add a comment about the log flag "override" behavior

Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>

---------

Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
Co-authored-by: Boaz Shuster <boaz.shuster.github@gmail.com>
This commit is contained in:
boaz-quotient 2023-04-26 19:48:24 +03:00 committed by GitHub
parent 0520425222
commit f54ca68ecd
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,7 +70,8 @@ pub struct GlobalOpts {
// Example in future : '--debug change log level to debug. (default: "warn")'
#[clap(long)]
pub debug: bool,
#[clap(short, long)]
// Set a consistent behavior like in runc and crun: set log to the last given value
#[clap(short, long, overrides_with("log"))]
pub log: Option<PathBuf>,
#[clap(long)]
pub log_format: Option<String>,