🛈 Note: This is pre-release documentation for the upcoming tracing 0.2.0 ecosystem.

For the release documentation, please see docs.rs, instead.

Function tracing::dispatch::get_default

pub fn get_default<T, F>(f: F) -> T
where F: FnMut(&Dispatch) -> T,
Expand description

Executes a closure with a reference to this thread’s current dispatcher.

Note that calls to get_default should not be nested; if this function is called while inside of another get_default, that closure will be provided with Dispatch::none rather than the previously set dispatcher.