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:
Jack Wills
2024-12-03 15:01:56 +00:00
parent c6200e8f77
commit c739637b91
7 changed files with 19 additions and 6 deletions
+9 -3
View File
@@ -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,
}