Trait ringlog::Drain

source ·
pub trait Drain: Send {
    // Required method
    fn flush(&mut self) -> Result<(), Error>;
}
Expand description

A Drain serves to receive log messages from a queue and flush them to an Output.

Required Methods§

source

fn flush(&mut self) -> Result<(), Error>

Flushes log messages from the queue to the Output for this Drain. This function must be called periodically to ensure there is capacity on the queue for new log messages. It is recommended that this function is called outside of any critical paths. For example, offloading to an admin thread or dedicated logging thread.

Implementors§