Struct slog::LevelFilter
[−]
[src]
pub struct LevelFilter<D: Drain> { // some fields omitted }
Record log level filter
Wraps a drain and passes records to it, only if their level is at least given level.
TODO: Remove this type. This drain is a special case of Filter
, but
because Filter
can not use static dispatch ATM due to Rust limitations
that will be lifted in the future, it is a standalone type.
Methods
impl<D: Drain> LevelFilter<D>
[src]
Trait Implementations
impl<D: Drain> Drain for LevelFilter<D>
[src]
type Error = D::Error
Type of potential error returned during logging
fn log(&self, info: &Record, logger_values: &OwnedKeyValueList) -> Result<(), Self::Error>
Write one logging record As an optimization (avoiding allocations), loggers are responsible for providing a byte buffer, that Drain
can use for their own needs. Read more