[−][src]Trait contralog::Logger
A logger is a routine that takes input and has side-effects.
See the documentation for the contralog crate for a general overview of loggers.
Associated Types
type Error
Required methods
Loading content...Provided methods
fn by_ref(&mut self) -> &mut Self
Create a “by reference” adaptor for this logger.
fn chain<L>(self, other: L) -> Chain<Self, L> where
Self: Sized,
Self: Sized,
Combine two loggers, creating a new logger that logs each input to both loggers.
fn filter<F>(self, f: F) -> Filter<Self, F> where
Self: Sized,
F: FnMut(&I) -> bool,
Self: Sized,
F: FnMut(&I) -> bool,
Apply a function to each input and pass it to the logger only if the function returns true for it.
fn map<F, B>(self, f: F) -> Map<Self, F, B> where
Self: Sized,
Self: Sized,
Apply a function to each input before passing it to the logger.
fn safe<E>(self) -> Safe<Self, E> where
Self: Sized,
Self: Sized,
Return a logger that silently drops errors reported by this logger.
Implementations on Foreign Types
impl<'a, I, L> Logger<I> for &'a mut L where
L: Logger<I>,
[src]
Loading content...
L: Logger<I>,
Implementors
impl<C, I> Logger<I> for Extender<C, I> where
C: Extend<I>,
[src]
C: Extend<I>,
impl<I, E> Logger<I> for Empty<I, E>
[src]
impl<I, L, E> Logger<I> for Safe<L, E> where
L: Logger<I>,
[src]
L: Logger<I>,
impl<I, L, F> Logger<I> for Filter<L, F> where
L: Logger<I>,
F: FnMut(&I) -> bool,
[src]
L: Logger<I>,
F: FnMut(&I) -> bool,
impl<I, L, F, B> Logger<B> for Map<L, F, B> where
L: Logger<I>,
F: FnMut(B) -> I,
[src]
L: Logger<I>,
F: FnMut(B) -> I,
impl<I, L, M> Logger<I> for Chain<L, M> where
L: Logger<I>,
M: Logger<I, Error = L::Error>,
I: Clone,
[src]
L: Logger<I>,
M: Logger<I, Error = L::Error>,
I: Clone,