Skip to main content

LogSink

Type Alias LogSink 

Source
pub type LogSink = Arc<dyn Fn(LogLevel, &str) + Send + Sync + 'static>;
Expand description

A sink receives the record’s level and its fully formatted body — no level prefix, no trailing newline.

Sinks are invoked synchronously on the calling thread; a sink needing async dispatch or extra buffering arranges it internally. A sink must tolerate being called from any thread, and must not assume it is the only sink the process will ever install.

Aliased Type§

pub struct LogSink { /* private fields */ }