Skip to main content

with_logging_enabled

Function with_logging_enabled 

Source
pub fn with_logging_enabled<F, R>(f: F) -> R
where F: FnOnce() -> R,
Expand description

Run a closure with logging enabled, then restore previous state.

Useful for tests that need to capture log output.