summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-07-15 23:16:55 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-07-15 23:20:54 -0400
commit07913d1185aad0aa730804392c39a138beb08931 (patch)
tree96763040cec4779f042d4717b84aae6fa610d48f
parente084e9f65bace1d8456199530a83132147013417 (diff)
logging: kill quiet optionv1.9.4
no logging by default, enabled with -v logging by default broke fstests Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--src/commands/list.rs6
-rw-r--r--src/commands/mount.rs6
-rw-r--r--src/logging.rs15
3 files changed, 8 insertions, 19 deletions
diff --git a/src/commands/list.rs b/src/commands/list.rs
index b1bf144a..33209995 100644
--- a/src/commands/list.rs
+++ b/src/commands/list.rs
@@ -152,10 +152,6 @@ pub struct Cli {
#[arg(short, long, action = clap::ArgAction::Set, default_value_t=stdout().is_terminal())]
colorize: bool,
- /// Quiet mode
- #[arg(short, long)]
- quiet: bool,
-
/// Verbose mode
#[arg(short, long, action = clap::ArgAction::Count)]
verbose: u8,
@@ -205,7 +201,7 @@ pub fn list(argv: Vec<String>) -> Result<()> {
let opt = Cli::parse_from(argv);
// TODO: centralize this on the top level CLI
- logging::setup(opt.quiet, opt.verbose, opt.colorize);
+ logging::setup(opt.verbose, opt.colorize);
cmd_list_inner(&opt)
}
diff --git a/src/commands/mount.rs b/src/commands/mount.rs
index 235a1825..e01f5388 100644
--- a/src/commands/mount.rs
+++ b/src/commands/mount.rs
@@ -250,10 +250,6 @@ pub struct Cli {
#[arg(short, long, action = clap::ArgAction::Set, default_value_t=stdout().is_terminal())]
colorize: bool,
- /// Quiet mode
- #[arg(short, long)]
- quiet: bool,
-
/// Verbose mode
#[arg(short, long, action = clap::ArgAction::Count)]
verbose: u8,
@@ -383,7 +379,7 @@ pub fn mount(mut argv: Vec<String>, symlink_cmd: Option<&str>) -> Result<()> {
let cli = Cli::parse_from(argv);
// TODO: centralize this on the top level CLI
- logging::setup(cli.quiet, cli.verbose, cli.colorize);
+ logging::setup(cli.verbose, cli.colorize);
cmd_mount_inner(&cli)
}
diff --git a/src/logging.rs b/src/logging.rs
index dee99881..98ca091f 100644
--- a/src/logging.rs
+++ b/src/logging.rs
@@ -1,15 +1,12 @@
use env_logger::WriteStyle;
use log::LevelFilter;
-pub fn setup(quiet: bool, verbose: u8, color: bool) {
- let level_filter = if quiet {
- LevelFilter::Off
- } else {
- match verbose {
- 0 => LevelFilter::Info,
- 1 => LevelFilter::Debug,
- _ => LevelFilter::Trace,
- }
+pub fn setup(verbose: u8, color: bool) {
+ let level_filter = match verbose {
+ 0 => LevelFilter::Off,
+ 1 => LevelFilter::Info,
+ 2 => LevelFilter::Debug,
+ _ => LevelFilter::Trace,
};
let style = if color {