pub struct Log { /* private fields */ }
Expand description
Buffered metrics log output.
Implementations§
Trait Implementations§
source§impl Buffered for Log
impl Buffered for Log
source§fn buffered(&self, buffering: Buffering) -> Self
fn buffered(&self, buffering: Buffering) -> Self
Return a clone with the specified buffering set.
source§fn get_buffering(&self) -> Buffering
fn get_buffering(&self) -> Buffering
Return the current buffering strategy.
source§fn is_buffered(&self) -> bool
fn is_buffered(&self) -> bool
Returns false if the current buffering strategy is
Buffering::Unbuffered
.
Returns true otherwise.source§impl CachedInput for Log
impl CachedInput for Log
source§fn cached(self, max_size: usize) -> InputCache
fn cached(self, max_size: usize) -> InputCache
Wrap an input with a metric definition cache.
This can provide performance benefits for metrics that are dynamically defined at runtime on each access.
Caching is useless if all metrics are statically declared
or instantiated programmatically in advance and referenced by a long living variable.
source§impl Formatting for Log
impl Formatting for Log
source§fn formatting(&self, format: impl LineFormat + 'static) -> Self
fn formatting(&self, format: impl LineFormat + 'static) -> Self
Specify formatting of output.
source§impl Input for Log
impl Input for Log
source§impl QueuedInput for Log
impl QueuedInput for Log
source§fn queued(self, max_size: usize) -> InputQueue
fn queued(self, max_size: usize) -> InputQueue
Wrap this output with an asynchronous dispatch queue of specified length.
source§impl WithAttributes for Log
impl WithAttributes for Log
source§fn get_attributes(&self) -> &Attributes
fn get_attributes(&self) -> &Attributes
Return attributes of component.
source§fn mut_attributes(&mut self) -> &mut Attributes
fn mut_attributes(&mut self) -> &mut Attributes
Return attributes of component for mutation.
source§fn with_attributes<F: Fn(&mut Attributes)>(&self, edit: F) -> Self
fn with_attributes<F: Fn(&mut Attributes)>(&self, edit: F) -> Self
Clone the component and mutate its attributes at once.
Auto Trait Implementations§
impl Freeze for Log
impl !RefUnwindSafe for Log
impl Send for Log
impl Sync for Log
impl Unpin for Log
impl !UnwindSafe for Log
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> Prefixed for Twhere
T: WithAttributes,
impl<T> Prefixed for Twhere
T: WithAttributes,
source§fn get_prefixes(&self) -> &NameParts
fn get_prefixes(&self) -> &NameParts
Returns namespace of component.
source§fn add_prefix<S>(&self, name: S) -> T
👎Deprecated since 0.7.2: Use named() or add_name()
fn add_prefix<S>(&self, name: S) -> T
Append a name to the existing names. Return a clone of the component with the updated names.
source§fn add_name<S>(&self, name: S) -> T
fn add_name<S>(&self, name: S) -> T
Append a name to the existing names. Return a clone of the component with the updated names.
source§fn named<S>(&self, name: S) -> T
fn named<S>(&self, name: S) -> T
Replace any existing names with a single name.
Return a clone of the component with the new name.
If multiple names are required, add_name
may also be used.
source§fn prefix_append<S: Into<MetricName>>(&self, name: S) -> MetricName
fn prefix_append<S: Into<MetricName>>(&self, name: S) -> MetricName
Append any name parts to the name’s namespace.
source§fn prefix_prepend<S: Into<MetricName>>(&self, name: S) -> MetricName
fn prefix_prepend<S: Into<MetricName>>(&self, name: S) -> MetricName
Prepend any name parts to the name’s namespace.