pub struct FanOut { /* private fields */ }Expand description
A sink that dispatches to multiple inner sinks.
Each inner sink receives records at or below its own
max_level. If an inner sink returns an error,
the error is logged to stderr and dispatch continues to the remaining
sinks.
use ticklog::{ConsoleSink, FanOut, Level, LogSinkExt};
let fan = FanOut::new()
.add(ConsoleSink::stdout().with_max_level(Level::Info))
.add(ConsoleSink::stderr().with_max_level(Level::Error));Implementations§
Trait Implementations§
Source§impl Default for FanOut
impl Default for FanOut
Source§fn default() -> Self
fn default() -> Self
Creates an empty fan-out sink, the same as FanOut::new.
Auto Trait Implementations§
impl !RefUnwindSafe for FanOut
impl !Sync for FanOut
impl !UnwindSafe for FanOut
impl Freeze for FanOut
impl Send for FanOut
impl Unpin for FanOut
impl UnsafeUnpin for FanOut
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