pub struct SdkLoggerProvider { /* private fields */ }Expand description
Handles the creation and coordination of Loggers.
All Loggers created by a SdkLoggerProvider will share the same
Resource and have their created log records processed by the
configured log processors. This is a clonable handle to the SdkLoggerProvider
itself, and cloning it will create a new reference, not a new instance of a
SdkLoggerProvider. 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§
Source§impl SdkLoggerProvider
impl SdkLoggerProvider
Sourcepub fn builder() -> LoggerProviderBuilder
pub fn builder() -> LoggerProviderBuilder
Create a new LoggerProvider builder.
Sourcepub fn force_flush(&self) -> OTelSdkResult
pub fn force_flush(&self) -> OTelSdkResult
Force flush all remaining logs in log processors and return results.
Sourcepub fn shutdown_with_timeout(&self, timeout: Duration) -> OTelSdkResult
pub fn shutdown_with_timeout(&self, timeout: Duration) -> OTelSdkResult
Shuts down this LoggerProvider
Sourcepub fn shutdown(&self) -> OTelSdkResult
pub fn shutdown(&self) -> OTelSdkResult
Shuts down this LoggerProvider with default timeout
Trait Implementations§
Source§impl Clone for SdkLoggerProvider
impl Clone for SdkLoggerProvider
Source§fn clone(&self) -> SdkLoggerProvider
fn clone(&self) -> SdkLoggerProvider
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more