pub struct LoggerSinks { /* private fields */ }Expand description
Registry of log sinks, deduplicating by output target so that multiple subsystems can share a single file or stdout/stderr stream.
Implementations§
Source§impl LoggerSinks
impl LoggerSinks
Sourcepub fn new() -> LoggerSinks
pub fn new() -> LoggerSinks
Creates an empty registry.
Sourcepub fn register<L>(&mut self, config: &LoggerConfig<L>) -> Vec<usize>where
L: LogLevel,
pub fn register<L>(&mut self, config: &LoggerConfig<L>) -> Vec<usize>where
L: LogLevel,
Registers every sink described by config and returns their indices.
Subsequent calls with a sink already registered (same file path, stdout, stderr or log-crate level) reuse the existing index instead of creating a new sink.
Trait Implementations§
Source§impl Debug for LoggerSinks
impl Debug for LoggerSinks
Source§impl Default for LoggerSinks
impl Default for LoggerSinks
Source§fn default() -> LoggerSinks
fn default() -> LoggerSinks
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LoggerSinks
impl RefUnwindSafe for LoggerSinks
impl Send for LoggerSinks
impl Sync for LoggerSinks
impl Unpin for LoggerSinks
impl UnsafeUnpin for LoggerSinks
impl UnwindSafe for LoggerSinks
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