[][src]Trait flexi_logger::writers::LogWriter

pub trait LogWriter: Sync + Send {
    fn write(&self, now: &mut DeferredNow, record: &Record) -> Result<()>;
fn flush(&self) -> Result<()>;
fn max_log_level(&self) -> LevelFilter; fn format(&mut self, format: FormatFunction) { ... }
fn shutdown(&self) { ... } }

Writes to a single log output stream.

Boxed instances of LogWriter can be used as additional log targets (see module description for more details).

Required methods

fn write(&self, now: &mut DeferredNow, record: &Record) -> Result<()>

Writes out a log line.

Errors

std::io::Error

fn flush(&self) -> Result<()>

Flushes any buffered records.

Errors

std::io::Error

fn max_log_level(&self) -> LevelFilter

Provides the maximum log level that is to be written.

Loading content...

Provided methods

fn format(&mut self, format: FormatFunction)

Sets the format function. Defaults to (formats::default_format), but can be changed with a call to Logger::format_for_writer.

The default implementation is a no-op.

fn shutdown(&self)

Cleanup open resources, if necessary.

Loading content...

Implementors

impl LogWriter for FileLogWriter[src]

impl LogWriter for SyslogWriter[src]

Loading content...