Struct slog::Filter [] [src]

pub struct Filter<D: Drain, F>(pub D, pub F) where F: Fn(&Record) -> bool + 'static + Send + Sync;

Drain filtering records

Wraps another Drain and passes Records to it, only if they satisfy a given condition.

Methods

impl<D: Drain, F> Filter<D, F> where F: 'static + Sync + Send + Fn(&Record) -> bool
[src]

Create Filter wrapping given drain

Trait Implementations

impl<D: Drain, F> Drain for Filter<D, F> where F: 'static + Sync + Send + Fn(&Record) -> bool
[src]

Type returned by this drain Read more

Type of potential errors that can be returned by this Drain

Handle one logging statement (Record) Read more

Pass Drain through a closure, eg. to wrap into another Drain. Read more

Filter logging records passed to Drain Read more

Filter logging records passed to Drain (by level) Read more

Map logging errors returned by this drain Read more

Ignore results returned by this drain Read more