Skip to main content

LogSink

Trait LogSink 

Source
pub trait LogSink: Sync {
    // Required method
    fn log(&self, record: &Record<'_>);

    // Provided method
    fn flush(&self) { ... }
}
Expand description

Backend a log record is delivered to.

Implementations must be Sync so the dispatcher can hold them in &'static [&dyn LogSink]. ISR-safety is per-impl — see the table in docs/roadmap/archived/phase-88-nros-log.md.

Required Methods§

Source

fn log(&self, record: &Record<'_>)

Render record. Called only when the record’s severity passes both the compile-time ceiling AND the Logger’s runtime threshold.

Provided Methods§

Source

fn flush(&self)

Optional flush hook (default no-op).

Implementors§