diff --git a/src/lib.rs b/src/lib.rs index c2d1fca..13fbfb3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -99,6 +99,12 @@ impl Verbosity { } } + /// 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.