1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
use log::Record;

/// Writes to a single log output stream.
///
/// Boxed instances of `LogWriter` can be used as additional log targets.
pub trait LogWriter: Sync + Send {
    /// write out a log line
    fn write(&self, record: &Record);

    /// Flushes any buffered records.
    fn flush(&self);
}