Struct slog::Filter
[−]
[src]
pub struct Filter<D: Drain> { // some fields omitted }
Drain filtering records
Wraps a Drain
and passes Record
-s to it, only if they satisifies a
condition cond
.
Methods
impl<D: Drain> Filter<D>
[src]
fn new<F: 'static + Sync + Send + Fn(&Record) -> bool>(drain: D, cond: F) -> Self
Create Filter wrapping given subdrain
and passing to it records
only the cond
is true