Struct env_logger::filter::Filter
source · pub struct Filter { /* private fields */ }
Expand description
A log filter.
This struct can be used to determine whether or not a log record
should be written to the output.
Use the Builder
type to parse and construct a Filter
.
Implementations§
source§impl Filter
impl Filter
sourcepub fn filter(&self) -> LevelFilter
pub fn filter(&self) -> LevelFilter
Returns the maximum LevelFilter
that this filter instance is
configured to output.
Example
use log::LevelFilter;
use env_logger::filter::Builder;
let mut builder = Builder::new();
builder.filter(Some("module1"), LevelFilter::Info);
builder.filter(Some("module2"), LevelFilter::Error);
let filter = builder.build();
assert_eq!(filter.filter(), LevelFilter::Info);
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Filter
impl Send for Filter
impl Sync for Filter
impl Unpin for Filter
impl UnwindSafe for Filter
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more