pub struct LoggerProviderBuilder { /* private fields */ }
Expand description
Builder for provider attributes.
Implementations§
Source§impl LoggerProviderBuilder
impl LoggerProviderBuilder
Sourcepub fn with_simple_exporter<T: LogExporter + 'static>(self, exporter: T) -> Self
pub fn with_simple_exporter<T: LogExporter + 'static>(self, exporter: T) -> Self
Adds a SimpleLogProcessor with the configured exporter to the pipeline.
§Arguments
exporter
- The exporter to be used by the SimpleLogProcessor.
§Returns
A new Builder
instance with the SimpleLogProcessor added to the pipeline.
Processors are invoked in the order they are added.
Sourcepub fn with_batch_exporter<T: LogExporter + 'static>(self, exporter: T) -> Self
pub fn with_batch_exporter<T: LogExporter + 'static>(self, exporter: T) -> Self
Adds a BatchLogProcessor with the configured exporter to the pipeline.
§Arguments
exporter
- The exporter to be used by the BatchLogProcessor.
§Returns
A new Builder
instance with the BatchLogProcessor added to the pipeline.
Processors are invoked in the order they are added.
Sourcepub fn with_log_processor<T: LogProcessor + 'static>(self, processor: T) -> Self
pub fn with_log_processor<T: LogProcessor + 'static>(self, processor: T) -> Self
Adds a custom LogProcessor to the pipeline.
§Arguments
processor
- TheLogProcessor
to be added.
§Returns
A new Builder
instance with the custom LogProcessor
added to the pipeline.
Processors are invoked in the order they are added.
Sourcepub fn with_resource(self, resource: Resource) -> Self
pub fn with_resource(self, resource: Resource) -> Self
The Resource
to be associated with this Provider.
Sourcepub fn build(self) -> SdkLoggerProvider
pub fn build(self) -> SdkLoggerProvider
Create a new provider from this configuration.
Trait Implementations§
Source§impl Debug for LoggerProviderBuilder
impl Debug for LoggerProviderBuilder
Source§impl Default for LoggerProviderBuilder
impl Default for LoggerProviderBuilder
Source§fn default() -> LoggerProviderBuilder
fn default() -> LoggerProviderBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LoggerProviderBuilder
impl !RefUnwindSafe for LoggerProviderBuilder
impl Send for LoggerProviderBuilder
impl Sync for LoggerProviderBuilder
impl Unpin for LoggerProviderBuilder
impl !UnwindSafe for LoggerProviderBuilder
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