Skip to content

Commit

Permalink
Merge pull request #94 from BTOdell/feature/is_set
Browse files Browse the repository at this point in the history
Add `is_present` public function
  • Loading branch information
epage authored Feb 14, 2024
2 parents 6420685 + ef15043 commit ca600f1
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`)
/// are present on the command line.
pub fn is_present(&self) -> bool {
self.verbose != 0 || self.quiet != 0
}

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

0 comments on commit ca600f1

Please sign in to comment.