tracing::dispatcher

Function get_default

Source
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.