Skip to content

Commit

Permalink
Add a get_verbosity() function
Browse files Browse the repository at this point in the history
  • Loading branch information
evanrittenhouse committed Feb 2, 2024
1 parent 69361b1 commit 6b14f20
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions foundations/src/telemetry/log/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ pub fn set_verbosity(level: Level) -> Result<()> {
Ok(())
}

/// Gets the current log's verbosity.
pub fn get_verbosity() -> LogVerbosity {
let harness = LogHarness::get();
harness.settings.verbosity
}

/// Returns current log as a raw [slog] crate's `Logger` used by Foundations internally.
///
/// Can be used to propagate the logging context to libraries that don't use Foundations'
Expand Down

0 comments on commit 6b14f20

Please sign in to comment.