Struct opentelemetry_sdk::logs::LoggerProvider
source · pub struct LoggerProvider { /* private fields */ }
Available on crate feature
logs
only.Expand description
Creator for Logger
instances.
Implementations§
source§impl LoggerProvider
impl LoggerProvider
sourcepub fn log_processors(&self) -> &Vec<Box<dyn LogProcessor>>
pub fn log_processors(&self) -> &Vec<Box<dyn LogProcessor>>
Log processors associated with this provider.
sourcepub fn force_flush(&self) -> Vec<LogResult<()>>
pub fn force_flush(&self) -> Vec<LogResult<()>>
Force flush all remaining logs in log processors and return results.
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
source§fn versioned_logger(
&self,
name: impl Into<Cow<'static, str>>,
version: Option<Cow<'static, str>>,
schema_url: Option<Cow<'static, str>>,
attributes: Option<Vec<KeyValue>>
) -> Logger
fn versioned_logger( &self, name: impl Into<Cow<'static, str>>, version: Option<Cow<'static, str>>, schema_url: Option<Cow<'static, str>>, attributes: Option<Vec<KeyValue>> ) -> Logger
Create a new versioned Logger
instance.
source§fn library_logger(&self, library: Arc<InstrumentationLibrary>) -> Self::Logger
fn library_logger(&self, library: Arc<InstrumentationLibrary>) -> Self::Logger
Returns a new versioned logger with the given instrumentation library. Read more
Auto Trait Implementations§
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> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<L, P> ObjectSafeLoggerProvider for P
impl<L, P> ObjectSafeLoggerProvider for P
source§fn boxed_logger(
&self,
library: Arc<InstrumentationLibrary>
) -> Box<dyn Logger + Send + Sync>
fn boxed_logger( &self, library: Arc<InstrumentationLibrary> ) -> Box<dyn Logger + Send + Sync>
Creates a versioned named
Logger
instance that is a trait object
through the underlying LoggerProvider
.