pub struct LoggerProvider { /* private fields */ }
Expand description
Handles the creation and coordination of Logger
s.
All Logger
s created by a LoggerProvider
will share the same
Resource
and have their created log records processed by the
configured log processors. This is a clonable handle to the LoggerProvider
itself, and cloning it will create a new reference, not a new instance of a
LoggerProvider
. Dropping the last reference will trigger the shutdown of
the provider, ensuring that all remaining logs are flushed and no further
logs are processed. Shutdown can also be triggered manually by calling
the shutdown
method.
Implementations§
Trait Implementations§
source§impl Clone for LoggerProvider
impl Clone for LoggerProvider
source§fn clone(&self) -> LoggerProvider
fn clone(&self) -> LoggerProvider
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LoggerProvider
impl Debug for LoggerProvider
source§impl LoggerProvider for LoggerProvider
impl LoggerProvider for LoggerProvider
Auto Trait Implementations§
impl Freeze for LoggerProvider
impl !RefUnwindSafe for LoggerProvider
impl Send for LoggerProvider
impl Sync for LoggerProvider
impl Unpin for LoggerProvider
impl !UnwindSafe for LoggerProvider
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)