Skip to main content

fmt

Function fmt 

Source
pub fn fmt<F, S>(fun: F, out: Arc<Mutex<S>>) -> Box<Closure>
where F: Fn(&mut S, &Level, &str, &str) -> Result + Send + Sync + Copy + 'static, S: Write + Send + 'static,
Expand description

Builds a capture callback around a compatible formatting function.

The output is locked for each event before the formatter is called. The returned callback panics if the lock is poisoned or the formatter returns an error.