Skip to main content

LoggingSink

Trait LoggingSink 

Source
pub trait LoggingSink: Send + Sync {
    // Required method
    fn emit(&self, record: LogRecord) -> Result<(), SinkError>;
}
Expand description

Trait for log destinations. Implementations are required to be thread-safe (Send + Sync); the decorator may emit from any thread that calls into the resource.

Required Methods§

Source

fn emit(&self, record: LogRecord) -> Result<(), SinkError>

Accept a record. Implementations must not panic on full / closed / IO-error conditions — return SinkError instead.

Implementors§