Struct slog_term::PlainDecorator [] [src]

pub struct PlainDecorator<W>(_)
where
    W: Write
;

Plain (no-op) Decorator implementation

This decorator doesn't do any coloring, and doesn't do any synchronization between threads, so is not Sync. It is however useful combined with slog_async::Async drain, as slog_async::Async uses only one thread, and thus requires only Send from Drains it wraps.

#[macro_use]
extern crate slog;
extern crate slog_term;
extern crate slog_async;

use slog::*;
use slog_async::Async;

fn main() {

   let decorator = slog_term::PlainDecorator::new(std::io::stdout());
   let drain = Async::new(
           slog_term::FullFormat::new(decorator).build().fuse()
       )
       .build()
       .fuse();
}

Methods

impl<W> PlainDecorator<W> where
    W: Write
[src]

[src]

Create PlainDecorator instance

Trait Implementations

impl<W> Decorator for PlainDecorator<W> where
    W: Write + Send + 'static, 
[src]

[src]

Get a RecordDecorator for a given record Read more