Skip to content

Commit

Permalink
Add is_set public function.
Browse files Browse the repository at this point in the history
  • Loading branch information
BTOdell committed Feb 13, 2024
1 parent 6420685 commit 2fc7470
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ impl<L: LogLevel> Verbosity<L> {
}
}

/// Whether any verbosity flags (either `--verbose` or `--quiet`)
/// have been specified on the command line.
pub fn is_set(&self) -> bool {
self.verbose != 0 || self.quiet != 0
}

/// Get the log level.
///
/// `None` means all output is disabled.
Expand Down

0 comments on commit 2fc7470

Please sign in to comment.