[−][src]Struct metrics_exporter_log::LogExporter
Exports metrics by converting them to a textual representation and logging them.
Methods
impl<R> LogExporter<R> where
R: MetricsRecorder + Clone + Into<String>,
[src]
R: MetricsRecorder + Clone + Into<String>,
pub fn new(controller: Controller, recorder: R, level: Level) -> Self
[src]
Creates a new LogExporter
that logs at the configurable level.
Recorders expose their output by being converted into strings.
pub fn run(&mut self, interval: Duration)
[src]
Runs this exporter on the current thread, logging output on the given interval.
pub fn turn(&self)
[src]
Run this exporter, logging output only once.
pub fn into_future(
self,
interval: Duration
) -> impl Future<Item = (), Error = ()>
[src]
self,
interval: Duration
) -> impl Future<Item = (), Error = ()>
Converts this exporter into a future which logs output on the given interval.
Auto Trait Implementations
impl<R> Send for LogExporter<R> where
R: Send,
R: Send,
impl<R> Sync for LogExporter<R> where
R: Sync,
R: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.