Struct slog_term::PlainSyncDecorator
[−]
[src]
pub struct PlainSyncDecorator<W>(_)
where
W: Write;
PlainSync Decorator
implementation
This implementation is exactly like PlainDecorator
but it takes care
of synchronizing writes to io
.
#[macro_use] extern crate slog; extern crate slog_term; use slog::*; fn main() { let plain = slog_term::PlainSyncDecorator::new(std::io::stdout()); let root = Logger::root( slog_term::FullFormat::new(plain).build().fuse(), o!() ); }
Methods
impl<W> PlainSyncDecorator<W> where
W: Write,
[src]
W: Write,
fn new(io: W) -> Self
Create PlainSyncDecorator
instance
Trait Implementations
impl<W> Decorator for PlainSyncDecorator<W> where
W: Write + Send + 'static,
[src]
W: Write + Send + 'static,
fn with_record<F>(
&self,
_record: &Record,
_logger_values: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut RecordDecorator) -> Result<()>,
&self,
_record: &Record,
_logger_values: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut RecordDecorator) -> Result<()>,
Get a RecordDecorator
for a given record
Read more