feat: --no-stderr cli arg, closes #52
New cli argument which will remove stderr output from logs, defaults to false
This commit is contained in:
+9
-3
@@ -37,13 +37,17 @@ pub struct Args {
|
||||
#[clap(long, short = None)]
|
||||
pub host: Option<String>,
|
||||
|
||||
/// Force use of docker cli when execing into containers
|
||||
#[clap(long="use-cli", short = None)]
|
||||
pub use_cli: bool,
|
||||
/// Do not include stderr output in logs
|
||||
#[clap(long = "no-stderr")]
|
||||
pub no_std_err: bool,
|
||||
|
||||
/// Directory for saving exported logs, defaults to `$HOME`
|
||||
#[clap(long="save-dir", short = None)]
|
||||
pub save_dir: Option<String>,
|
||||
|
||||
/// Force use of docker cli when execing into containers
|
||||
#[clap(long="use-cli", short = None)]
|
||||
pub use_cli: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -58,6 +62,7 @@ pub struct CliArgs {
|
||||
pub raw: bool,
|
||||
pub show_self: bool,
|
||||
pub timestamp: bool,
|
||||
pub std_err: bool,
|
||||
pub use_cli: bool,
|
||||
}
|
||||
|
||||
@@ -92,6 +97,7 @@ impl CliArgs {
|
||||
in_container: Self::check_if_in_container(),
|
||||
save_dir: logs_dir,
|
||||
raw: args.raw,
|
||||
std_err: !args.no_std_err,
|
||||
show_self: !args.show_self,
|
||||
timestamp: !args.timestamp,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user